【发布时间】:2014-07-23 16:36:13
【问题描述】:
我们有一个使用 apache-maven 3.0.5 构建的多模块项目。
这里是设置:
- 通过 Jenkins 运行 Sonar 插件。
- SonarQube 服务器和 MySQL 位于另一台计算机上。
- 在 Jenkins 上使用 Sonar 插件运行分析,然后将结果推送到 SonarQube 服务器。
这是我在运行 Sonar 作业时收到的警告。
**这些警告似乎对服务器结果没有影响。 SonarQube 服务器显示违反规则,并且那里似乎没有缺少任何类。
分析前:
[WARNING] The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:
15:04:52 [WARNING] o com.company.product.plugins:com.company.product.external.libraries:jar:1.0.0-SNAPSHOT (provided)
15:04:52 [WARNING] Try running the build up to the lifecycle phase "package"
15:04:52 [WARNING] The following dependencies could not be resolved at this point of the build but seem to be part of the reactor:
15:04:52 [WARNING] o com.company.product.plugins:com.company.product.capturetool.core:jar:1.0.0-SNAPSHOT (provided)
分析过程中:
Class 'com/company/product/core/tools/ocraction/MyClass' is not accessible through the ClassLoader.
[WARN] [15:05:25.731] Class 'com/company/product/core/tools/ocraction/MyClass' is not accessible through the ClassLoader.
分析后:
[INFO] com.company.product.core.feature ................ SKIPPED
[INFO] com.company.product.common.feature ... SKIPPED
[INFO] My Product ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
我很困惑为什么会这样。我在网上搜遍了没有答案。在声纳分析之前,我收到了诸如 .m2 目录损坏等响应,以运行“mvn clean package”而不是“mvn clean install”。
【问题讨论】: