J'utilise hbm2java via Maven pour générer POJO, il produira des fichiers tels que Table.java, mais ce que je veux est AbstractTable.javaQuelle est la meilleure façon de modifier le nom du fichier de POJO lors de la génération de hbm2java
Y a-t-il un moyen facile de faire ceci?
De mon pom.xml:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
<executions>
<execution>
<id>hbm2hbmxml</id>
<phase>generate-sources</phase>
<goals>
<goal>hbm2hbmxml</goal>
</goals>
<configuration>
<components>
<component>
<name>hbm2hbmxml</name>
<outputDirectory>src/main</outputDirectory>
</component>
</components>
<componentProperties>
<revengfile>src/conf/reveng.xml</revengfile>
<propertyfile>src/conf/hibernate.properties</propertyfile>
<templatepath>src/conf/hibernate-templates</templatepath>
<jdk5>true</jdk5>
</componentProperties>
</configuration>
</execution>
<execution>
<id>hbm2cfgxml</id>
<phase>generate-sources</phase>
<goals>
<goal>hbm2cfgxml</goal>
</goals>
<configuration>
<components>
<component>
<name>hbm2cfgxml</name>
<outputDirectory>src/main</outputDirectory>
</component>
</components>
<componentProperties>
<revengfile>src/conf/reveng.xml</revengfile>
<propertyfile>src/conf/hibernate.properties</propertyfile>
<templatepath>src/conf/hibernate-templates</templatepath>
<jdk5>true</jdk5>
</componentProperties>
</configuration>
</execution>
<execution>
<id>hbm2java</id>
<phase>generate-sources</phase>
<goals>
<goal>hbm2java</goal>
</goals>
<configuration>
<components>
<component>
<name>hbm2java</name>
<outputDirectory>src/main</outputDirectory>
</component>
</components>
<componentProperties>
<revengfile>src/conf/reveng.xml</revengfile>
<propertyfile>src/conf/hibernate.properties</propertyfile>
<templatepath>src/conf/hibernate-templates</templatepath>
<jdk5>true</jdk5>
<namingstrategy>uk.co.company.product.hibernate.CustomNamingStrategy</namingstrategy>
</componentProperties>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-tools</artifactId>
<version>3.2.3.GA</version>
</dependency>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.8</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>2.1_3</version>
</dependency>
</dependencies>
</plugin>