Sonar 3.5.1不适用于Java 8和maven 3.3.9 with war文件

时间:2017-04-26 12:57:30

标签: sonarqube sonar-runner sonarqube-scan

我们正在将现有项目升级到java 8和maven 3.3.9我们有声纳3.5.1,虽然最新版本的声纳可用但我们不想更新声纳,因为我们已经在声纳3.5中进行了一些定制0.1。

  

主要是我们在同一个tomcat中部署声纳战争   已部署我们的项目,但在新的声纳版本war文件夹是   已删除,他们提供了单独的声纳服务器,我们没有   想。

所以请帮助我运行声纳3.5.1或者告诉我如何对最新的声纳版本进行战争并将其部署在我自己的tomcat中。我在过去两天尝试这个,并测试了不同的版本,但没有成功。当使用声纳3.5.1时,我们得到以下错误

   [INFO] Sonar version: 3.5.1 
   [INFO] ------------------------------------------------------------------------ 
   [INFO] BUILD FAILURE 
   [INFO] ------------------------------------------------------------------------ 
   [INFO] Total time: 3.007 s 
   [INFO] Finished at: 2017-04-26T23:47:34+05:30 
   [INFO] Final Memory: 24M/218M 
   [INFO]  ------------------------------------------------------------------------ 
   [ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project app25apr1: Execution default-cli of goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar failed: A required class was missing while executing org.codehaus.mojo:sonar-maven-plugin:2.0:sonar: org/sonatype/aether/graph/DependencyFilter 
   [ERROR]  ----------------------------------------------------- 
   [ERROR] realm =    plugin>org.codehaus.mojo:sonar-maven-plugin:2.0 
   [ERROR] strategy =   org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy 
   [ERROR] urls[0] =   file:/home/ist/innoeye/headStart8Repository/org/codehaus/mojo/sonar-maven-plugin/2.0/sonar-maven-plugin-2.0.jar
   [ERROR] urls[1] =   file:/home/ist/innoeye/headStart8Repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
   [ERROR] urls[2] =   file:/home/ist/innoeye/headStart8Repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
   [ERROR] urls[3] =   file:/home/ist/innoeye/headStart8Repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
   [ERROR] urls[4] =   file:/home/ist/innoeye/headStart8Repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
   [ERROR] urls[5] =   file:/home/ist/innoeye/headStart8Repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
   [ERROR] urls[6] =   file:/home/ist/innoeye/headStart8Repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
   [ERROR] urls[7] =   file:/home/ist/innoeye/headStart8Repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
   [ERROR] urls[8] =   file:/home/ist/innoeye/headStart8Repository/org/codehaus/plexus/plexus-utils/2.0.4/plexus-utils-2.0.4.jar
   [ERROR] Number of foreign imports: 1 
   [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]] 
   [ERROR]  
   [ERROR]  -----------------------------------------------------: org.sonatype.aether.graph.DependencyFilter

1 个答案:

答案 0 :(得分:6)

Sonar 3.5.1已有4年历史。我强烈建议使用最新的LTS(5.6.6),它使用Java 8和maven 3.3.9。

如果您不想因自定义而升级,我不知道您是否能够分析您的项目。