我正在尝试在我的eclipse环境中运行maven构建,并收到以下错误:
[错误]无法执行目标 org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:检查(检查) project schedule-adapter:目标参数'check' org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:检查丢失或 无效 - > [帮助1] org.apache.maven.lifecycle.LifecycleExecutionException:失败 执行目标org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:检查 (检查)项目进度 - 适配器:参数“检查”目标 org.jacoco:jacoco-maven-plugin:0.6.1.201212231917:检查丢失或 无效的 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:221) 在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) 在 org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
我不明白,因为这适用于我在不同工作区的其他项目。我将精确的jacoco配置复制到我的新项目pom中,其内容如下:
<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中运行的maven命令是
mvn clean install -e
任何人都能脱颖而出吗?我一直试图解决这个问题。当我从我的pom中删除所有这些内容时,我的项目会生成但不会检查jacoco。
由于 莱恩
答案 0 :(得分:2)