maven-2 - 在没有外部访问的情况下执行 "mvn sonar:sonar"

标签 maven-2 sonarqube

我尝试在 Maven 配置为无法访问外部存储库的计算机上执行 mvn sonar:sonar 命令(实际上,情况并非完全如此,但它帮助我解释我的问题)。

所以目前,如果我运行此命令,我会收到以下错误:

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] The plugin 'org.codehaus.mojo:sonar-maven-plugin' does not exist or no valid version could be found

我认为这意味着我的本地存储库中有一些不正确的元数据,因为我有一个[本地存储库]\org\codehaus\mojo\sonar-maven-plugin\1.0-beta-1 目录(当然里面有 JAR)。

你知道为什么我的命令失败吗?

技术信息:Maven 2.2.1、Java 1.6、Sonar 2.1.2

最佳答案

您是否尝试过常见问题解答中的建议:

The plugin 'org.apache.maven.plugins:maven-sonar-plugin' does not exist or no valid version could be found

If you get this error message after launching the maven command line "mvn sonar:sonar" add the "-U" parameter to the command line. Maven will then update its local repository with the latest version of the Sonar Maven plugin.

If adding the "-U" parameter doesn't fix your issue, you've certainly encountered Maven bug MNG-4001. The only known workaround is to delete the org\codehaus\mojo directory in your local Maven repository. Of course, if your local Maven repository is synchronized with a repository manager like Nexus, this operation must be also done on the repository manager side.

关于maven-2 - 在没有外部访问的情况下执行 "mvn sonar:sonar",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3051816/

相关文章:

maven-2 - 为 jetty :run and deployment 定义依赖项的干式方式

inheritance - 不使用项目聚合(多模块)时是否需要打包类型 'pom'?

SonarQube,分别是单元测试覆盖率和集成测试覆盖率

javascript - 将 JSHint 规则转换为 Sonar

gradle - Gradle Powermock代码覆盖丢失

maven-2 - Maven : How to create assembly with snapshot artifacts without timestamps file name?

maven-2 - 使用 Maven 2 将程序集部署到 FTP 服务器

linux - gwt-maven-plugin 在获取 gwt-dev 工件时附加 "-linux"

java - VM 初始化期间发生错误 : Could not reserve enough space for object heap

maven - 如何使用 Sonar maven 插件根据 Quality Gate 验证本地代码?