Maven build failing from missing resources


(Mark Jaffe) #1

Running maven 3.5.4 under Jenkins control, build slave cache has been cleared. I get an error Failed to parse plugin descriptor for org.sonarsource.sonarqube:sonar-scanner-engine-shaded:7.0 (/home/jenkins/workspace/my_project-dir/cache/m2/repository/org/sonarsource/sonarqube/sonar-scanner-engine-shaded/7.0/sonar-scanner-engine-shaded-7.0.jar): No plugin descriptor found at META-INF/maven/plugin.xml but I can see the downloaded artifacts:

total 22540
-rw-r--r-- 1 build build      230 Feb 14 16:31 _remote.repositories
-rw-r--r-- 1 build build 23060703 Feb 14 16:31 sonar-scanner-engine-shaded-7.0.jar
-rw-r--r-- 1 build build       40 Feb 14 16:31 sonar-scanner-engine-shaded-7.0.jar.sha1
-rw-r--r-- 1 build build     1707 Feb 14 16:31 sonar-scanner-engine-shaded-7.0.pom
-rw-r--r-- 1 build build       40 Feb 14 16:31 sonar-scanner-engine-shaded-7.0.pom.sha1

(Adam Gabryś) #2

How did you execute the analysis? It seems to me that you execute a Java library as a Maven plugin.

You should execute:

mvn org.sonarsource.scanner.maven:sonar-maven-plugin:3.6.0.1398:sonar

or

mvn sonar:sonar

Here is a full documentation: Analyzing with SonarQube Scanner for Maven


(Mark Jaffe) #3

I’ve been doing the latter, let me see if the former works better.


(Mark Jaffe) #4

I have been invoking sonar as mentioned above, but issue manifests differently now. See Why is analysis “User cache” set to a strange value, and how can I set it to be cleared?