hibernate4-maven-plugin生成PostgreSQL模式的正确配置是什么?

Ami*_*rHd 4 postgresql schema plugins hibernate maven

我一直试图通过hibernate4-maven-plugin生成PostgreSQL模式,这种模式的创建方式与我为MySQL完成的方式相同,但没有找到任何资源.

这是MySQLmaven插件设置的版本:

<plugin>
    <groupId>de.juplo</groupId>
    <artifactId>hibernate4-maven-plugin</artifactId>
    <version>1.0.1</version>
    <executions>
        <execution>
            <goals>
                <goal>export</goal>
            </goals>
        </execution>
    </executions>

    <configuration>
        <driverClassName>com.mysql.jdbc.Driver</driverClassName>
        <hibernateDialect>org.hibernate.dialect.MySQL5Dialect</hibernateDialect>
        <username>testuser</username>
        <password>testpasswd</password>
        <url>jdbc:mysql://localhost:3306/mydb</url>
        <target>BOTH</target>
    </configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)

Ami*_*rHd 5

经过一些抽搐参数后,我也得到了它PostgreSQL.

以下是对我来说像魅力的maven设置:

<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>
        <driverClassName>org.postgresql.Driver</driverClassName>
        <hibernateDialect>org.hibernate.dialect.PostgresPlusDialect</hibernateDialect>
        <username>postgres</username>
        <password>postgres</password>
        <url>jdbc:postgresql://localhost:5432/mydb</url>
        <target>BOTH</target>
    </configuration>
    <dependencies>
        <dependency>
            <groupId>postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>9.1-901.jdbc4</version>
        </dependency>
    </dependencies>

</plugin>
Run Code Online (Sandbox Code Playgroud)