Maven多模块和插件调用
我的多模块项目具有以下结构:Maven多模块和插件调用,maven,maven-plugin,multi-module,maven-module,Maven,Maven Plugin,Multi Module,Maven Module,我的多模块项目具有以下结构: parent module 1 <-- inherits from parent via <relativePath>../parent/pom.xml</relativePath> module 2 <-- inherits from parent via <relativePath>../parent/pom.xml</relativePath> aggregator <-- aggregates
parent
module 1 <-- inherits from parent via <relativePath>../parent/pom.xml</relativePath>
module 2 <-- inherits from parent via <relativePath>../parent/pom.xml</relativePath>
aggregator <-- aggregates modules with <modules><module>
parent
模块1简言之:否
模块在其自身POM中未定义的生命周期中获取插件的唯一方法是从其父级继承配置
<>你应该考虑把父和聚合器合并成一个单独的项目,也就是让AgGrGror也成为父级。那样更干净
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>some path</destFile>
</configuration>
</execution>
</executions>
<configuration>
<append>true</append>
</configuration>
</plugin>
</plugins>
</build>