Hello All我正在尝试重用竹子在SONAR中生成的jacoco覆盖率报告并获取覆盖范围详细信息。
这些是我正在使用的SONAR参数
<sonar.sources>../${project.artifactId}/src</sonar.sources>
<sonar.binaries>../${project.artifactId}/target/classes</sonar.binaries>
<sonar.tests>../${project.artifactId}/src</sonar.tests>
<sonar.dynamicAnalysis>reUseReports</sonar.dynamicAnalysis>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.junit.reportsPath>../../Product/com.foo.tool.features.build/Reports/jacoco.exec.all.xml</sonar.junit.reportsPath>
<sonar.jacoco.reportPath>../../Product/com.foo.tool.features.build/coverage_data/jacoco.exec</sonar.jacoco.reportPath>
<sonar.jacoco.itReportPath>../../Product/com.foo.tool.features.build/Int_data/jacoco.ui.exec</sonar.jacoco.itReportPath>
<sonar.surefire.reportsPath>../${project.artifactId}/target/surefire-reports/</sonar.surefire.reportsPath>
但我没有得到任何类型的覆盖数据。我缺少任何参数? 。请帮助我,因为我坚持这个并且无法继续前进
[INFO] Sonar version: 3.7.1
INFO: Default locale: "en_US", source code encoding: "windows-1252" (analysis is platform dependent)
INFO: Work directory: D:\Builds\workspace\product A 4X Features\productProduct\com.foo.bar.features4x.build\target\sonar
INFO: SonarQube Server 3.7.1
[INFO] [16:13:58.799] Load batch settings
[INFO] [16:13:59.423] User cache: C:\Users\msh3cob\.sonar\cache
[INFO] [16:13:59.423] Install plugins
[INFO] [16:14:13.385] Install JDBC driver
[INFO] [16:14:13.728] Create JDBC datasource for jdbc:mysql://fmght45.apac.fooc.com:3341/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8
[INFO] [16:14:16.973] Initializing Hibernate
[INFO] [16:14:21.638] views plugin licensed to xService, PRODUCTION [Expiration: 2014-04-03, Server: 13cb2bd44fb4b6a]
[INFO] [16:14:24.040] Load project settings
[INFO] [16:14:24.430] Apply project exclusions
[INFO] [16:14:24.477] Exclude project: com.foo.bar.namingconventions.executionengine [com.foo.bar.plugins:com.foo.bar.namingconventions.executionengine]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.namingconventions.model [com.foo.bar.plugins:com.foo.bar.namingconventions.model]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.namingconventions.rule [com.foo.bar.plugins:com.foo.bar.namingconventions.rule]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.namingconventions.rule.ui [com.foo.bar.plugins:com.foo.bar.namingconventions.rule.ui]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.namingconventions.target [com.foo.bar.plugins:com.foo.bar.namingconventions.target]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.namingconventions.target.ui [com.foo.bar.plugins:com.foo.bar.namingconventions.target.ui]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.namingconventions.ui [com.foo.bar.plugins:com.foo.bar.namingconventions.ui]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.testutils [com.foo.bar.plugins:com.foo.bar.testutils]
[INFO] [16:14:24.477] Exclude project: org.artop.ecl.testutils [com.foo.bar.plugins:org.artop.ecl.testutils]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.varianthandling.base [com.foo.bar.plugins:com.foo.bar.varianthandling.base]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.varianthandling.base.ui [com.foo.bar.plugins:com.foo.bar.varianthandling.base.ui]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.varianthandling.formula [com.foo.bar.plugins:com.foo.bar.varianthandling.formula]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.varianthandling.formula.ui [com.foo.bar.plugins:com.foo.bar.varianthandling.formula.ui]
[INFO] [16:14:24.477] Exclude project: com.foo.bar.images3x [com.foo.bar.plugins:com.foo.bar.images3x]
[INFO] [16:14:24.492] Exclude project: com.foo.bar.namingconventions4x [com.foo.bar.plugins:com.foo.bar.namingconventions4x]
[INFO] [16:14:24.492] Exclude project: com.foo.bar.interfacerte.ar2x [com.foo.bar.plugins:com.foo.bar.interfacerte.ar2x]
[INFO] [16:14:24.492] Exclude project: com.foo.bar.gmf.component40 [com.foo.bar.plugins:com.foo.bar.gmf.component40]
[INFO] [16:14:24.492] Exclude project: com.foo.bar.gmf.compostion40 [com.foo.bar.plugins:com.foo.bar.gmf.compostion40]
[INFO] [16:14:24.492] Exclude project: com.foo.bar.systemtopology.editor4x [com.foo.bar.plugins:com.foo.bar.systemtopology.editor4x]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.importer.ldf.common [com.foo.bar.plugins:com.foo.bar.importer.ldf.common]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.model.fibex3x [com.foo.bar.plugins:com.foo.bar.model.fibex3x]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.importer.fibex.fibex3x.common [com.foo.bar.plugins:com.foo.bar.importer.fibex.fibex3x.common]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.importer.dbc3x [com.foo.bar.plugins:com.foo.bar.importer.dbc3x]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.importer.fibex.loader3x [com.foo.bar.plugins:com.foo.bar.importer.fibex.loader3x]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.importer.fibex.loader2x [com.foo.bar.plugins:com.foo.bar.importer.fibex.loader2x]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.model.fibex20 [com.foo.bar.plugins:com.foo.bar.model.fibex20]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.importer.model.dbc4x [com.foo.bar.plugins:com.foo.bar.importer.model.dbc4x]
[INFO] [16:14:24.539] Exclude project: com.foo.bar.model.fibex4x [com.foo.bar.plugins:com.foo.bar.model.fibex4x]
[INFO] [16:14:30.108] ------------- Scan com.foo.bar.arpackage.browser
[INFO] [16:14:30.108] Load module settings
[INFO] [16:14:32.495] Quality profile : [name=product-A,language=java]
[INFO] [16:14:32.495] Excluded sources:
[INFO] [16:14:32.495] **/Activator.java
[INFO] [16:14:32.495] **/*Messages.java
[INFO] [16:14:32.495] **/*Test.java
[INFO] [16:14:32.495] **/*test.java
[INFO] [16:14:32.495] Included tests:
[INFO] [16:14:32.495] **/*test.java
[INFO] [16:14:32.495] Excluded tests:
[INFO] [16:14:32.495] **/package-info.java
[INFO] [16:14:32.854] Configure Maven plugins
[INFO] [16:14:33.026] Compare to previous analysis (2014-02-27)
[INFO] [16:14:33.072] Compare over 30 days (2014-01-28, analysis of 2014-02-04 16:02:40.0)
[INFO] [16:14:33.166] Compare to previous version (2014-02-21)
[INFO] [16:14:33.587] Execute generate-sources...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building com.foo.bar.arpackage.browser 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- tycho-packaging-plugin:0.19.0:build-qualifier (default-build-qualifier) @ com.foo.bar.arpackage.browser ---
[INFO] The project's OSGi version is 1.0.0.201402271044
[INFO]
[INFO] --- tycho-packaging-plugin:0.19.0:validate-id (default-validate-id) @ com.foo.bar.arpackage.browser ---
[INFO]
[INFO] --- tycho-packaging-plugin:0.19.0:validate-version (default-validate-version) @ com.foo.bar.arpackage.browser ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4:25.950s
[INFO] Finished at: Thu Feb 27 16:14:34 IST 2014
[INFO] Final Memory: 277M/666M
[INFO] ------------------------------------------------------------------------
[INFO] [16:14:35.787] Execute generate-sources done: 2200 ms
[INFO] [16:14:35.849] Initializer FindbugsMavenInitializer...
[INFO] [16:14:35.880] Initializer FindbugsMavenInitializer done: 31 ms
[INFO] [16:14:35.880] Base dir: D:\Builds\workspace\product A 4X Features\CoreFeatures\com.foo.bar.arpackage.browser
[INFO] [16:14:35.880] Working dir: D:\Builds\workspace\product A 4X Features\CoreFeatures\com.foo.bar.arpackage.browser\target\sonar
[INFO] [16:14:35.880] Source dirs: D:\Builds\workspace\product A 4X Features\CoreFeatures\com.foo.bar.arpackage.browser\src
[INFO] [16:14:35.880] Binary dirs: D:\Builds\workspace\product A 4X Features\CoreFeatures\com.foo.bar.arpackage.browser\target\classes
[INFO] [16:14:35.880] Source encoding: UTF-8, default locale: en_US
[INFO] [16:14:35.896] Sensor JavaSourceImporter...
[INFO] [16:14:36.255] Sensor JavaSourceImporter done: 359 ms
[INFO] [16:14:36.255] Sensor JavaSquidSensor...
[INFO] [16:14:36.348] Java AST scan...
[INFO] [16:14:37.690] Java AST scan done: 1342 ms
[INFO] [16:14:37.706] Java bytecode scan...
[WARN] [16:14:39.266] Class 'com/foo/tool/platform/ui/util/Util' is not accessible through the ClassLoader.
[WARN] [16:14:39.266] Class 'com/foo/tool/platform/ui/util/Util' is not accessible through the ClassLoader.
[WARN] [16:14:39.266] Class 'com/foo/tool/platform/ui/util/Util' is not accessible through the ClassLoader.
[WARN] [16:14:39.281] Class 'com/foo/tool/platform/ui/util/Util' is not accessible through the ClassLoader.
[WARN] [16:14:39.281] Class 'com/foo/tool/common/util/Util' is not accessible through the ClassLoader.
[INFO] [16:14:40.545] Java bytecode scan done: 2839 ms
[INFO] [16:14:40.576] Package design analysis...
[INFO] [16:14:40.670] Package design analysis done: 94 ms
[INFO] [16:14:40.935] Sensor JavaSquidSensor done: 4680 ms
[INFO] [16:14:40.935] Sensor FindbugsSensor...
[INFO] [16:14:40.935] Execute Findbugs 2.0.1...
[INFO] [16:14:43.259] Findbugs output report: D:\Builds\workspace\product A 4X Features\CoreFeatures\com.foo.bar.arpackage.browser\target\sonar\findbugs-result.xml
The following classes needed for analysis were missing:
com.foo.bar.platform.ui.util.AATPlatformUIUtil
com.foo.bar.platform.ui.util.SplittableUtil
com.foo.bar.common.util.AATPlatformUtil
[INFO] [16:15:00.154] Execute Findbugs 2.0.1 done: 19219 ms
[INFO] [16:15:00.232] Sensor FindbugsSensor done: 19297 ms
[INFO] [16:15:00.232] Sensor CpdSensor...
[INFO] [16:15:00.232] SonarEngine is used
[INFO] [16:15:00.248] Cross-project analysis disabled
[INFO] [16:15:00.529] Sensor CpdSensor done: 297 ms
[INFO] [16:15:00.529] Sensor PmdSensor...
[INFO] [16:15:00.544] Execute PMD 4.3...
[INFO] [16:15:00.560] Java version: 1.5
[INFO] [16:15:00.653] PMD configuration: D:\Builds\workspace\product A 4X Features\CoreFeatures\com.foo.bar.arpackage.browser\target\sonar\pmd.xml
[INFO] [16:15:05.177] Execute PMD 4.3 done: 4633 ms
[INFO] [16:15:05.255] Sensor PmdSensor done: 4726 ms
[INFO] [16:15:05.255] Sensor SurefireSensor...
[INFO] [16:15:05.255] parsing D:\Builds\workspace\product A 4X Features\productProduct\com.foo.bar.features4x.build\Reports
[INFO] [16:15:05.271] Sensor SurefireSensor done: 16 ms
[INFO] [16:15:05.271] Sensor CheckstyleSensor...
[INFO] [16:15:05.271] Execute Checkstyle 5.6...
[INFO] [16:15:05.287] Checkstyle configuration: D:\Builds\workspace\product A 4X Features\CoreFeatures\com.foo.bar.arpackage.browser\target\sonar\checkstyle.xml
[INFO] [16:15:06.815] Execute Checkstyle 5.6 done: 1544 ms
[INFO] [16:15:06.831] Sensor CheckstyleSensor done: 1560 ms
[INFO] [16:15:06.831] Sensor InitialOpenIssuesSensor...
[INFO] [16:15:06.878] Sensor InitialOpenIssuesSensor done: 47 ms
[INFO] [16:15:06.878] Sensor ProfileSensor...
[INFO] [16:15:08.126] Sensor ProfileSensor done: 1248 ms
[INFO] [16:15:08.126] Sensor ProfileEventsSensor...
[INFO] [16:15:08.173] Sensor ProfileEventsSensor done: 47 ms
[INFO] [16:15:08.173] Sensor ProjectLinksSensor...
[INFO] [16:15:08.188] Sensor ProjectLinksSensor done: 15 ms
[INFO] [16:15:08.188] Sensor VersionEventsSensor...
[INFO] [16:15:08.204] Sensor VersionEventsSensor done: 16 ms
[INFO] [16:15:08.204] Sensor Maven dependencies...
[INFO] [16:15:11.433] Sensor Maven dependencies done: 3229 ms
[INFO] [23:26:25.799] Sensor JaCoCoSensor...
[INFO] [23:26:25.799]分析D:\ Builds \ workspace \ Features \ Product \ com.foo.tool.features.build \ coverage_data \ jacoco.exec [INFO] [23:26:28.334]没有关于每次测试的覆盖率的信息。 [INFO] [16:16:08.093]没有关于每次测试的覆盖率的信息。 [INFO] [16:16:08.093]传感器JaCoCoSensor完成:56660毫秒 [INFO] [23:25:52.780]传感器JaCoCoItSensor ...... [INFO] [23:25:52.780]分析D:\ Builds \ workspace \ Features \ Product \ com.foo.tool.features.build \ Int_Data \ jacoco.ui.exec [INFO] [23:26:22.472]没有关于每次测试的覆盖率的信息。 [INFO] [23:26:22.472]传感器JaCoCoItSensor完成:29692 ms [INFO] [23:26:22.472]传感器JaCoCoOverallSensor ...... [INFO] [23:26:24.105]分析D:\ Builds \ workspace \ Features \ Importers \ com.foo.tool.importer \ target \ sonar \ jacoco-overall.exec [INFO] [23:26:24.244]没有关于每次测试的覆盖率的信息。 [INFO] [23:26:24.244]传感器JaCoCoOverallSensor完成:1772毫秒 [INFO] [16:16:10.121]执行装饰器......