我指定了一种休眠方言,似乎已经找到了,但是我仍然得到:
Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2java (default-cli) on project pds-planning: Execution default-cli of goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2java failed: Hibernate Dialect must be explicitly set -> [Help 1]
我的完整日志输出来自
mvn hibernate3:hbm2java
此处:
Apache Maven 3.5.2 (Red Hat 3.5.2-5)
Maven home: /usr/share/maven
Java version: 1.8.0_131, vendor: Oracle Corporation
Java home: /opt/jdk1.8.0_131/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.17.2-200.fc28.x86_64", arch: "amd64", family: "unix"
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building pds advanced planning 18.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
<configuration>
<buildFilters default-value="${project.build.filters}"/>
<delimiters>
<delimiter>@</delimiter>
</delimiters>
<encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
<escapeString>${maven.resources.escapeString}</escapeString>
<escapeWindowsPaths default-value="true">${maven.resources.escapeWindowsPaths}</escapeWindowsPaths>
<includeEmptyDirs default-value="false">${maven.resources.includeEmptyDirs}</includeEmptyDirs>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<overwrite default-value="false">${maven.resources.overwrite}</overwrite>
<project default-value="${project}"/>
<resources default-value="${project.resources}"/>
<session default-value="${session}"/>
<supportMultiLineFiltering default-value="false">${maven.resources.supportMultiLineFiltering}</supportMultiLineFiltering>
<useBuildFilters default-value="true"/>
<useDefaultDelimiters default-value="true">false</useDefaultDelimiters>
</configuration>
<configuration>
<componentProperties>
<revengfile>src/main/resources/hibernate.reveng.xml</revengfile>
<propertyfile>src/main/resources/hibernate.properties</propertyfile>
<packagename>com.pds.pds.models</packagename>
<jdk5>true</jdk5>
<ejb3>true</ejb3>
</componentProperties>
<components>
<component>
<name>hbm2java</name>
<implementation>jdbcconfiguration</implementation>
<outputDirectory>target/generated-sources</outputDirectory>
</component>
</components>
<project>${project}</project>
</configuration>
[INFO]
[INFO] >>> hibernate3-maven-plugin:2.2:hbm2java (default-cli) > process-resources @ pds-planning >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ pds-planning ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
directory /common/home/tw/java-projects/pds-18/pds-planning-18/src/main/resources
excludes []
includes [**/application*.yml, **/application*.yaml, **/application*.properties]
[INFO] Copying 2 resources
directory /common/home/tw/java-projects/pds-18/pds-planning-18/src/main/resources
excludes [**/application*.yml, **/application*.yaml, **/application*.properties]
includes []
[INFO] Copying 12 resources
[INFO]
[INFO] <<< hibernate3-maven-plugin:2.2:hbm2java (default-cli) < process-resources @ pds-planning <<<
[INFO]
[INFO]
[INFO] --- hibernate3-maven-plugin:2.2:hbm2java (default-cli) @ pds-planning ---
[INFO] using jdbcconfiguration task.
[INFO] Hibernate 3.3.1.GA
[INFO] loaded properties from resource hibernate.properties: {hibernate.test.new_metadata_mappings=true, hibernate.connection.driver_class=org.postgresql.Driver, hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect, hibernate.max_fetch_depth=5, hibernate.connection.username=tw, hibernate.connection.url=jdbc:postgresql://localhost/aps18?currentSchema=aerospace, hibernate.connection.password=****, hibernate.bytecode.use_reflection_optimizer=false, hibernate.show_sql=false, hibernate.connection.pool_size=5}
[INFO] Bytecode provider name : javassist
[INFO] using JDK 1.4 java.sql.Timestamp handling
[INFO] Configuration XML file loaded: file:/common/home/tw/java-projects/pds-18/pds-planning-18/src/main/resources/hibernate.cfg.xml
[INFO] configuring from url: file:/common/home/tw/java-projects/pds-18/pds-planning-18/src/main/resources/hibernate.cfg.xml
[INFO] Configured SessionFactory: null
, java.vm.specification.vendor=Oracle Corporation, os.name=Linux, classworlds.conf=/usr/share/maven/bin/m2.conf, sun.jnu.encoding=UTF-8, java.library.path=/common/oracle/product/12.2.0/dbhome_1/lib:/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib, maven.conf=/usr/share/maven/conf, java.specification.name=Java Platform API Specification, java.class.version=52.0, hibernate.connection.pool_size=5, sun.management.compiler=HotSpot 64-Bit Tiered Compilers, hibernate.test.new_metadata_mappings=true, os.version=4.17.2-200.fc28.x86_64, library.jansi.path=/usr/share/maven/lib/jansi-native, user.home=/common/home/tw, user.timezone=America/Panama, java.awt.printerjob=sun.print.PSPrinterJob, file.encoding=UTF-8, java.specification.version=1.8, hibernate.connection.driver_class=org.postgresql.Driver, java.class.path=/usr/share/java/plexus-classworlds.jar, user.name=tw, hibernate.bytecode.use_reflection_optimizer=false, hibernate.show_sql=false, org.slf4j.simpleLogger.defaultLogLevel=debug, java.vm.specification.version=1.8, sun.java.command=org.codehaus.plexus.classworlds.launcher.Launcher -X hibernate3:hbm2java, java.home=/opt/jdk1.8.0_131/jre, sun.arch.data.model=64, hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect, hibernate.connection.url=jdbc:postgresql://localhost/aps18?currentSchema=aerospace, user.language=en, java.specification.vendor=Oracle Corporation, awt.toolkit=sun.awt.X11.XToolkit, java.vm.info=mixed mode, java.version=1.8.0_131, java.ext.dirs=/opt/jdk1.8.0_131/jre/lib/ext:/usr/java/packages/lib/ext, sun.boot.class.path=/opt/jdk1.8.0_131/jre/lib/resources.jar:/opt/jdk1.8.0_131/jre/lib/rt.jar:/opt/jdk1.8.0_131/jre/lib/sunrsasign.jar:/opt/jdk1.8.0_131/jre/lib/jsse.jar:/opt/jdk1.8.0_131/jre/lib/jce.jar:/opt/jdk1.8.0_131/jre/lib/charsets.jar:/opt/jdk1.8.0_131/jre/lib/jfr.jar:/opt/jdk1.8.0_131/jre/classes, java.vendor=Oracle Corporation, maven.home=/usr/share/maven, file.separator=/, java.vendor.url.bug=http://bugreport.sun.com/bugreport/, sun.io.unicode.encoding=UnicodeLittle, sun.cpu.endian=little, hibernate.max_fetch_depth=5, sun.desktop=gnome, sun.cpu.isalist=}
[INFO] Configuration Properties file loaded: /common/home/tw/java-projects/pds-18/pds-planning-18/src/main/resources/hibernate.properties
[INFO] Override file: /common/home/tw/java-projects/pds-18/pds-planning-18/src/main/resources/hibernate.reveng.xml
[WARNING] No connection properties specified - the user must supply JDBC connections
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.531 s
[INFO] Finished at: 2018-06-30T11:37:56-05:00
[INFO] Final Memory: 19M/256M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2java (default-cli) on project pds-planning: Execution default-cli of goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2java failed: Hibernate Dialect must be explicitly set -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2java (default-cli) on project pds-planning: Execution default-cli of goal org.codehaus.mojo:hibernate3-maven-plugin:2.2:hbm2java failed: Hibernate Dialect must be explicitly set
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
...
Caused by: org.hibernate.HibernateException: Hibernate Dialect must be explicitly set
at org.hibernate.dialect.DialectFactory.determineDialect (DialectFactory.java:80)
...