Q:

How to use hibernate4-maven-plugin to generate multiple dialects schemas?

I wanna use the hibernate4-maven-plugin to generate the database schema in SQL.
But I have a condition: I wanna generate 3 schemas at time:

one for Postgres, 
one for Oracle and 
another for SQL Server.

Here's my configuration:
<plugin>
    <groupId>de.juplo</groupId>
    <artifactId>hibernate4-maven-plugin</artifactId>
    <version>1.0.3</version>
    <executions>
        <execution>
            <goals>
                <goal>export</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <hibernateDialect>org.hibernate.dialect.PostgreSQLDialect</hibernateDialect>

        <!-- I want generate the schemas for these dialects too, at same time... -->
        <!-- <hibernateDialect>org.hibernate.dialect.Oracle10gDialect</hibernateDialect>-->
        <!-- <hibernateDialect>org.hibernate.dialect.SQLServerDialect</hibernateDialect>-->

        <target>SCRIPT</target>
    </configuration>
</plugin>

I look at the official docs (link above), but it's not clearly if it's possible or not.
There is a way to do this with hibernate4-maven-plugin?
Thanks!

A:

You can create 3 executions from the plugin, each using a specific dialect
<plugin>
<groupId>de.juplo</groupId>
<artifactId>hibernate4-maven-plugin</artifactId>
<version>1.0.3</version>
<executions>
    <!-- postgres -->
    <execution>
        <id>postgres</id>
        <goals>
            <goal>export</goal>
        </goals>
        <configuration>
            <hibernateDialect>org.hibernate.dialect.PostgreSQLDialect</hibernateDialect>
            <target>SCRIPT</target>
            <outputFile>${project.build.directory}/postgres-schema.sql.</outputFile>
        </configuration>
    </execution>
    <!-- oracle -->
    <execution>
        <id>oracle</id>
        <goals>
            <goal>export</goal>
        </goals>
        <configuration>
            <hibernateDialect>org.hibernate.dialect.Oracle10gDialect</hibernateDialect>
            <target>SCRIPT</target>
            <outputFile>${project.build.directory}/oracle-schema.sql.</outputFile>
        </configuration>
    </execution>
    <!-- sql-server -->
    <execution>
        <id>sql-server</id>
        <goals>
            <goal>export</goal>
        </goals>
        <configuration>
            <hibernateDialect>org.hibernate.dialect.SQLServerDialect</hibernateDialect>
            <target>SCRIPT</target>
            <outputFile>${project.build.directory}/sqlserver-schema.sql.</outputFile>
        </configuration>
    </execution>
</executions>

