java - Hibernate3-Maven-Plugin 排除生成的文件

标签 java hibernate maven hibernate3-maven-plugin

我有一两个不应在映射过程中生成的类。有没有一种方法可以指定不在 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>

最佳答案

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

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

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

关于java - Hibernate3-Maven-Plugin 排除生成的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25327639/

相关文章:

使用 Eclipse 和 Maven 进行 Java 编码

java - 项目关闭后,Intellij IDEA 如何减少内存?

Java应用程序,具有多个场景

java - 打印出了什么问题,它停在某个地方,无法加载打印

java - JPA - SortedSet 需要 OrderBy

java - 运行简单的 Maven 项目后出现此错误

javascript - 我如何管理 jhipster 当局的权限?

java - 如何在一定的时间间隔后重复调用一个方法?

java - 关闭 Hibernate c3p0 的日志记录

java - 为什么 ORDER BY DATEDIFF 在使用 JPA 的 SQL 服务器上引发异常?