Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven多模块和插件调用_Maven_Maven Plugin_Multi Module_Maven Module - Fatal编程技术网

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>