首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
社区首页 >问答首页 >SonarQube - Maven的依赖问题

SonarQube - Maven的依赖问题
EN

Stack Overflow用户
提问于 2014-07-23 16:36:13
回答 1查看 1.1K关注 0票数 1

我们有一个用apache 3.0.5构建的多模块项目。

下面是设置:

  • 通过Jenkins运行Sonar插件。
  • SonarQube服务器和MySQL驻留在另一台计算机上。
  • 使用Jenkins上的Sonar插件运行分析,然后将结果推送到SonarQube服务器。

以下是我在运行声纳作业时收到的警告。

**这些警告似乎对服务器结果没有影响。SonarQube服务器显示违反规则的情况,似乎没有遗漏任何类。

分析前:

代码语言:javascript
代码运行次数:0
运行
复制
[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)

在分析期间:

代码语言:javascript
代码运行次数:0
运行
复制
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.

经分析后:

代码语言:javascript
代码运行次数:0
运行
复制
[INFO] com.company.product.core.feature ................ SKIPPED
[INFO] com.company.product.common.feature ... SKIPPED
[INFO] My Product ............................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

我不明白为什么会发生这种事。我在互联网上搜遍了没有答案。在Sonar分析之前,我得到了一些响应,比如运行"mvn干净包“而不是"mvn干净安装”的.m2目录损坏。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-07-23 16:51:01

我设法解决了这个问题。我发现Sonar插件并没有单独运行命令"mvn干净安装“。相反,它只是运行"mvn声纳:声纳“以及任何附加的参数。

我执行"mvn清洁安装“之前,声纳的后构建步骤。这有助于解决我的问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24916140

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档