1
votes

I am doing a sonar analysis from my machine using a sonar instance on a remote server. Local machine: Window7, apache-maven-3.2.5 Remote sonarcube server: sonarcube Version 3.7.3 I am using below command from command prompt:

mvn sonar:sonar -Dsonar.jdbc.url=<jdbcurl> -Dsonar.host.url=<sonarserver url>

I have defined a sonar profile for running the same

Whe I run the said mvn command, then I am getting below error:

[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.6:sonar (default-cli) on project builder-allmodules: Can not execute SonarQube analysis: Can not execute Findbugs: java.lang.RuntimeException: edu.umd.cs.findbugs.NoClassesFoundToAnalyzeException: No classes found to analyze in mymavenproject\target\classes *xyz.jar *F:\m2\repository\commons-io\commons-io\2.4\commons-io-2.4.jar *abc.jar *lmn.jar aaa.jarbbb.jar *ggg.jar

mymavenproject\target\classes: doesn't have any classes, instead, there is bundled jar at mymavenproject\target\ which contains all the classes

Also, another issue is that it is trying to analyze all the dependent jars also which should not be the case as I need sonar analysis for my project only

Can you let me know what I might be missing?

1

1 Answers

0
votes

Because you've included FindBugs rules in your analysis profile, you're required to provide unbundled classes to the analysis.