Hibernate3-Maven-Plugin Exclude Generated Files

510 views Asked by At

I have a class or two that shouldn't be generated on the mapping process. Is there a way that I can specify the individual classes not to generate in the hbm2java Goal?

I have the plugin configuration as follows:

<groupId>org.codehaus.mojo</groupId>
<artifactId>hibernate3-maven-plugin</artifactId>
<version>3.0</version>
<executions>
    <execution>
        <id>hbm2java</id>
        <phase>generate-sources</phase>
        <goals>
            <goal>hbm2java</goal>
        </goals>
        <inherited>false</inherited>

        <configuration>
            <hibernatetool>
                <annotationconfiguration propertyFile="src/main/resources/hibernate.cfg.xml" />
                <hbm2java jdk5="true" ejb3="true"/>
            </hibernatetool>

        </configuration>
    </execution>
</executions>
1

There are 1 answers

0
Andy N On

Specify the tables you don't want in a reveng.xml file. E.g.

<table-filter match-name="TABLE_A" exclude="true" />
<table-filter match-name="TABLE_B" exclude="true" />

And then reference the reveng.xml in your configuration.