【发布时间】:2014-02-10 05:22:16
【问题描述】:
- Maven 3.0.4
- sonar-maven-plugin 2.2
- jacoco-maven-plugin 0.6.4.201312101107
当我运行 mvn sonar:sonar 时,jacoco-maven-plugin 的 prepare-agent 目标无法运行,因此代理参数在需要时不会出现。
当我显式运行 mvn prepare-package sonar:sonar 时,我在 jacoco 初始化中得到一个无限递归。
显然我错过了什么,但是什么?
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<executions>
<!--
Prepares the property pointing to the JaCoCo runtime agent which
is passed as VM argument when Maven the Surefire plugin is executed.
-->
<execution>
<id>default-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>jaCoCoSurefireArgLine</propertyName>
</configuration>
</execution>
<execution>
<id>default-report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
【问题讨论】: