我是Sonar.When的新手,我试着用这个例子来编写自定义规则,我看到的依赖项“sonar-plugin”是6.7版。但我的声纳版本是7.0。我不知道这两者有什么区别。所以我下载了SonarSource 7.0来获取jar。但是,当我构建Maven项目“sonar-plugin”时,会出现以下错误。
[INFO] os.detected.name: windows
[INFO] os.detected.arch: x86_64
[INFO] os.detected.version: 10.0
[INFO] os.detected.version.major: 10
[INFO] os.detected.version.minor: 0
[INFO] os.detected.classifier: windows-x86_64
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]
[INFO] --------------------------------------------------------------------- ---
[INFO] Building SonarQube :: Plugin API 7.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for org.sonarsource.sonarqube:sonar-check-api:jar:7.0- SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.sonarsource.sonarqube:sonar-duplications:jar:7.0-SNAPSHOT is missing, no dependency information available
[WARNING] The POM for org.sonarsource.sonarqube:sonar-testing-harness:jar:7.0-SNAPSHOT is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.468 s
[INFO] Finished at: 2018-05-16T18:41:47+08:00
[INFO] Final Memory: 9M/121M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project sonar-plugin-api: Could not resolve dependencies for project org.sonarsource.sonarqube:sonar-plugin-api:jar:7.0-SNAPSHOT: The following artifacts could not be resolved: org.sonarsource.sonarqube:sonar-check-api:jar:7.0-SNAPSHOT, org.sonarsource.sonarqube:sonar-duplications:jar:7.0-SNAPSHOT, org.sonarsource.sonarqube:sonar-testing-harness:jar:7.0-SNAPSHOT: Could not find artifact org.sonarsource.sonarqube:sonar-check-api:jar:7.0-SNAPSHOT -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException发布于 2018-05-17 05:43:08
似乎您向项目中添加了错误的库。引用此马文声纳阿皮并在pom文件中添加所需的依赖项,然后执行mvn clean install,而不是添加jar文件。
发布于 2018-05-17 05:33:55
你说的是哪个例子?
您的错误是,您正在构建一个子模块而没有构建SonarQube的所有模块。转到您的克隆根目录,只需执行一个mvn install。
https://stackoverflow.com/questions/50383819
复制相似问题