I need to be able to call mvn clean install and have maven call hibernate3:hbm2hbmxml to generate the mapping files from a database and after than call hbm2java to get the J
If you want to have your model java files (obtained by reveng) compiled, you don't need to run hbm2hbmxml.
plugin configuration:
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 :
you fire this with:
mvn clean hibernate3:hbm2java compile
if you want it to be fired just with:
mvn clean compile
add the "executions" tag in your plugin definition
compile
hbm2java