我在我的应用程序中使用jOOQ和MySQL DB。对于集成测试,我使用H2数据库,存在一个问题。有没有办法两次运行jooq-codegen-maven插件?我为这个案子找到了一些maven示例。但是,在两种不同的情况下,我必须使用两种不同的依赖项。我是否可以在执行中包括依赖关系?
发布于 2014-09-29 17:05:49
您可以在任何Maven插件配置中拥有多个<execution>元素。
<plugin>
<groupId>org.jooq</groupId>
<artifactId>jooq-codegen-maven</artifactId>
<version>3.9.1</version>
<executions>
<execution>
<id>first-generation</id>
<phase>generate-sources</phase>
<goals><goal>generate</goal></goals>
<configuration>
<!-- jOOQ configuration here -->
</configuration>
</execution>
<execution>
<id>second-generation</id>
<phase>generate-sources</phase>
<goals><goal>generate</goal></goals>
<configuration>
<!-- jOOQ configuration here -->
</configuration>
</execution>
</executions>
</plugin>https://stackoverflow.com/questions/26103628
复制相似问题