如果你想要你的模型java文件(由reveng获得)编译,你不需要运行hbm2hbmxml.
插件配置:
org.codehaus.mojo
hibernate3-maven-plugin
2.2
hbm2java
src/main/java
jdbcconfiguration
/src/main/resources/reveng/model.reveng.xml
/src/main/resources/META-INF/hibernate.properties
true
true
mysql
mysql-connector-java
5.0.8
cglib
cglib-nodep
2.1_3
hibernate.properties:
hibernate.dialect = org.hibernate.dialect.MySQLInnoDBDialect
hibernate.connection.driver_class = com.mysql.jdbc.Driver
hibernate.connection.url = jdbc:mysql://localhost:3306/YOUR_DB
hibernate.connection.username = yourUsrName
hibernate.connection.password= yourPwd
hibernate.default_schema = YOUR_DB
model.reveng.xml:
你用:
mvn clean hibernate3:hbm2java compile
如果你想要的是:
mvn clean compile
在你的插件定义中添加“执行”标签
compile
hbm2java