我想运行一个Maven构建在我的Eclipse环境中,我收到以下错误:jacoco:检查失败由于无效的参数
[ERROR] Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:check (check) on project schedule-adapter: The parameters 'check' for goal org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:check are missing or invalid -> [Help 1] org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:check (check) on project schedule-adapter: The parameters 'check' for goal org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:check are missing or invalid at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
我不明白,因为这工作在我的其他项目一个不同的工作区。我复制了确切jacoco配置到我的新项目聚甲醛,并将其内容如下:
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>check</id>
<goals>
<goal>check</goal>
</goals>
<configuration>
<haltOnFailure>true</haltOnFailure>
<rules>
<rule>
<limits>
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
<limit>
<counter>CLASS</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.75</minimum>
</limit>
</limits>
</rule>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
我的行家命令在Eclipse中运行是
mvn clean install -e
任何站出来的人?我一直试图弄清楚这一点。当我从我的pom中删除所有这些,我的项目建立,但jacoco没有被检查。
感谢 瑞安
以下依赖项...? – planty182
不幸的是,它已经很久了,我甚至不知道我的代码在哪里使用它!但基本上确保jacoco版本是0.6.3及以上:) – 75inchpianist