Я использую Maven плагин, чтобы генерировать POJO и дао:Пользовательские зимуют инструмент экспортер
<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>
ужасно Дао и POJO генерируются в одном пакете
В Hibernate инструментов он HARDCODED
DAOExporter : setFilePattern("{package-name}/{class-name}Home.java");
POJOExporter : setFilePattern("{package-name}/{class-name}.java");
Я нахожу это крайне уродливым, и я хотел бы иметь pojo и dao в разных упаковках, а также не суффиксы Dao от «Home», а просто «Dao»
Знаете ли вы, есть ли способ предоставить пользовательскую реализацию Exporter или настроить что-то в подключаемом устройстве для достижения этого?
благодаря