【问题标题】:Hibernate3-Maven-Plugin Exclude Generated FilesHibernate3-Maven-Plugin 排除生成的文件
【发布时间】:2014-10-09 06:16:07
【问题描述】:

我有一两个不应该在映射过程中生成的类。有没有办法可以指定不在 hbm2java 目标中生成的单个类?

我的插件配置如下:

<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>

【问题讨论】:

标签: java hibernate maven hibernate3-maven-plugin


【解决方案1】:

在 reveng.xml 文件中指定不需要的表。 例如

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

然后在你的配置中引用 reveng.xml。

【讨论】:

    猜你喜欢
    • 2012-10-27
    • 2012-03-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-08-20
    • 1970-01-01
    • 2011-06-11
    • 1970-01-01
    相关资源
    最近更新 更多