Besides generating other source files, I want to generate one factory class for DAO classes - DAOFactory.java. I'm using hbmtemplate for that purpose - with my own *.ftl file.
Problem is that (as I understand correctly) file is generated for each entity in database. Is it possible to generate that file only once?
Part of my pom.xml:
<execution>
<id>hbmtemplate0</id>
<phase>generate-sources</phase>
<goals>
<goal>hbmtemplate</goal>
</goals>
<configuration>
<components>
<component>
<name>hbmtemplate</name>
<outputDirectory>src/main/java</outputDirectory>
</component>
</components>
<componentProperties>
<revengfile>/src/main/resources/hibernate.reveng.xml</revengfile>
<propertyfile>src/main/resources/database.properties</propertyfile>
<jdk5>false</jdk5>
<ejb3>false</ejb3>
<packagename>my.package.name</packagename>
<format>true</format>
<haltonerror>true</haltonerror>
<templatepath>src/main/resources/reveng.templates/</templatepath>
<filepattern>DAOFactory.java</filepattern>
<template>DAOFactory.java.ftl</template>
</componentProperties>
</configuration>
</execution>