I use the maven plug in to generate pojo and dao :
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>hbm2java</goal>
<goal>hbm2dao</goal>
<goal>hbm2ddl</goal>
</goals>
</execution>
</executions>
<configuration>
<components>
<component>
<name>hbm2java</name>
<implementation>configuration</implementation>
<outputDirectory>src/main/java</outputDirectory>
</component>
<component>
<name>hbm2dao</name>
<implementation>configuration</implementation>
<outputDirectory>src/main/java</outputDirectory>
</component>
<component>
<name>hbm2ddl</name>
<implementation>configuration</implementation>
<outputDirectory>src/main/resources/sql</outputDirectory>
</component>
</components>
<componentProperties>
<jdk5>true</jdk5>
<format>true</format>
<configurationfile>src/main/resources/hibernate/hibernate.cfg.xml</configurationfile>
<drop>true</drop>
<create>true</create>
<outputfilename>init.sql</outputfilename>
<templatepath>src/main/resources/templateftl</templatepath>
</componentProperties>
</configuration>
awfully the dao and pojo are generated in the same package
In hibernate tools it is hardcoded
DAOExporter : setFilePattern("{package-name}/{class-name}Home.java");
POJOExporter : setFilePattern("{package-name}/{class-name}.java");
I find it is extremly ugly and I would like to have pojo and dao in different package and also no suffixing the Dao by "Home" but just "Dao"
Do you know if there is some way to provide a custom Exporter implementation or configure something in the pluging to achieve this ?
thanks