Maven构建问题:阅读jacoco.exec文件

时间:2016-01-15 12:11:57

标签: maven sonarqube jacoco-maven-plugin sonar-maven-plugin

我们的jacoco.exec文件有几个不同的错误,请参阅下面的错误类型。

您能否帮我们解决这个问题,由于Jacoco,我们至少有25%的构建失败。

错误类型1:

 09:18:17 [INFO] ------------------------------------------------------------------------
 09:18:17 [INFO] BUILD FAILURE
 09:18:17 [INFO] ------------------------------------------------------------------------
 09:18:17 [INFO] Total time: 02:02 min
 09:18:17 [INFO] Finished at: 2015-12-22T09:18:17+01:00
 09:18:17 [INFO] Final Memory: 148M/2933M
 09:18:17 [INFO] ------------------------------------------------------------------------
 09:18:17 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project athena: Unable to read /repo/jenkins/production/workspace/CSW_All_Build_PreMerge-gate/support-functions/Common/target/jacoco.exec: malformed input around byte 2 -> [Help 1]
 09:18:17 [ERROR] 
 09:18:17 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
 09:18:17 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 09:18:17 [ERROR] 

错误类型2:

 11:44:13 [INFO] ------------------------------------------------------------------------
 11:44:13 [INFO] BUILD FAILURE
 11:44:13 [INFO] ------------------------------------------------------------------------
 11:44:13 [INFO] Total time: 02:04 min
 11:44:13 [INFO] Finished at: 2015-12-21T11:44:14+01:00
 11:44:13 [INFO] Final Memory: 141M/3045M
 11:44:13 [INFO] ------------------------------------------------------------------------
 11:44:13 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project athena: Unable to read /repo/jenkins/production/workspace/CSW_All_Build_PreMerge-gate/support-functions/Common/target/jacoco.exec: Invalid execution data file. -> [Help 1]
 11:44:13 [ERROR] 
 11:44:13 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
 11:44:13 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 11:44:13 [ERROR] 
 11:44:13 [ERROR] For more information about the errors and possible solutions, please read the following articles:
 11:44:13 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 11:44:14 Build step 'Execute shell' marked build as failure
 11:44:14 [htmlpublisher] Archiving HTML reports...

错误类型3:

 14:33:23 [INFO] ------------------------------------------------------------------------
 14:33:23 [INFO] BUILD FAILURE
 14:33:23 [INFO] ------------------------------------------------------------------------
 14:33:23 [INFO] Total time: 01:51 min
 14:33:23 [INFO] Finished at: 2015-12-21T14:33:23+01:00
 14:33:24 [INFO] Final Memory: 149M/2977M
 14:33:24 [INFO] ------------------------------------------------------------------------
 14:33:24 [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.7.1:sonar (default-cli) on project athena: Unable to read /repo/jenkins/production/workspace/CSW_All_Build_PreMerge-gate/support-functions/Common/target/jacoco.exec: Unknown block type 2d. -> [Help 1]
 14:33:24 [ERROR] 
 14:33:24 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
 14:33:24 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
 14:33:24 [ERROR] 
 14:33:24 [ERROR] For more information about the errors and possible solutions, please read the following articles:
 14:33:24 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
 14:33:24 Build step 'Execute shell' marked build as failure
 14:33:24 [htmlpublisher] Archiving HTML reports...

版本:

  • 尝试了jacoco-maven-plugin:0.7.4.201502262128和
    jacoco-maven-plugin:0.7.5.201505241946 org.testng:6.9.9
  • org.apache.maven.plugins.maven故障安全-插件:2.18
  • org.apache.maven.plugins.maven-万无一失-插件:2.18.1
  • SonarQube 4.5.5 Sonar-maven-plugin 2.7.1

0 个答案:

没有答案