我有两个要生成 hbm2java 的数据库。
<project>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version> 2.2</version>
<executions>
<execution>
<id>db1</id>
<configuration>
<components>
<component>
<name>hbm2java</name>
...
</component>
</components>
<componentProperties>
...
<configurationfile>.../hibernate1.cfg.xml</configurationfile>
</componentProperties>
</execution>
<execution>
<id>db2</id>
<configuration>
<components>
<component>
<name>hbm2java</name>
...
</component>
</components>
<componentProperties>
...
<configurationfile>.../hibernate2.cfg.xml</configurationfile>
</componentProperties>
</execution>
</executions>
...
</plugin>
...
</plugins>
...
</project>
好的,如果我运行,mvn hibernate3:hbm2java
那么它不会执行!
这是日志:
[INFO] >>> hibernate3-maven-plugin:2.2:hbm2java (default-cli) @ XXXXXXXXXXXXX >>>
[INFO]
[INFO] --- maven-resources-plugin:2.5:resources (default-resources) @ XXXXXXXXXXXXX ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 5 resources
[INFO]
[INFO] <<< hibernate3-maven-plugin:2.2:hbm2java (default-cli) @ XXXXXXXXXXXXX <<<
[INFO]
[INFO] --- hibernate3-maven-plugin:2.2:hbm2java (default-cli) @ XXXXXXXXXXXXX ---
[INFO] using configuration task.
11:07:29,370 INFO org.hibernate.cfg.Environment - Hibernate 3.3.1.GA
11:07:29,376 INFO org.hibernate.cfg.Environment - hibernate.properties not found
11:07:29,381 INFO org.hibernate.cfg.Environment - Bytecode provider name : javassist
11:07:29,387 INFO org.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling
[INFO] No hibernate configuration file loaded.
[INFO] No hibernate properties file loaded.
11:07:29,464 INFO org.hibernate.tool.Version - Hibernate Tools 3.2.4.GA
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
任何想法?