Hi.
I am trying to migrate my ant build to maven2. in my build.xml I invoke the hbm2java in the following way:
<hibernatetool destdir="/src/generated/">
<configuration configurationfile="${env.ITP_HOME}/core/xml/hibernate/hibernate.cfg.xml">
<fileset dir="/xml/hibernate">
<include name="*.hbm.xml"/>
</fileset>
</configuration>
<hbm2java/>
</hibernatetool>
my hibernate.cfg.xml is:
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle10gDialect</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
</session-factory>
in my maven2 POM file I have:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>hbm2java</id>
<phase>generate-sources</phase>
<goals>
<goal>hbm2java</goal>
</goals>
<configuration>
<components>
<component>
<name>hbm2java</name>
<implementation>configuration</implementation>
<outputDirectory>/src/main/java</outputDirectory>
</component>
</components>
<componentProperties>
<jdk5>true</jdk5>
<configurationfile>/src/main/resources/hibernate.cfg.xml</configurationfile>
</componentProperties>
</configuration>
</execution>
but when executing mvn hibernate3:hbm2java
i see no files get generated unless they are all listed in hibernate.cfg.xml.
Is there a way to specify a fileset in the maven configuration similar to the ant task?
thanks, naor