Sonarqube scanner failing for SOME projects

37 views
Skip to first unread message

Mark Jaffe

unread,
Nov 27, 2018, 1:40:35 PM11/27/18
to Jenkins Users
We are switching from an older Jenkins instance (1.646) to a newer one (2.121.3), and during addition of pipeline (Jenkinsfile) configuration, one of the projects succeeds, and most of the others are failing with error: 
[ERROR] Failed to execute goal org.sonarsource.scanner.maven:sonar-maven-plugin:3.5.0.1254:sonar (default-cli) on project myproject: Unable to execute SonarQube: Fail to download sonar-scanner-engine-shaded-7.2.1-all.jar to ?/.sonar/cache/_tmp/fileCache5699353903196323022.tmp: EOFException -> [Help 1]

Where the scan succeeds, I do not get that message; all projects share credentials, and I am using the following configuration in POM:
(for properties:)
<sonar.version>7.2.1</sonar.version>
<sonar.maven.version>3.5.0.1254</sonar.maven.version>
(for pluginManagent in <build> block:)
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>${sonar.maven.version}</version>
<executions>
<execution>
<goals>
<goal>sonar</goal>
</goals>
</execution>
</executions>
</plugin>



The step in the Jenkinsfile for analysis is:
    stage('Test') {
      agent { docker mavenImage }
      steps {
        withCredentials([file(credentialsId: mavenCreds, variable: 'CREDS')]) {
          sh 'mv $CREDS ./settings.xml'
        }
        sh 'java -version ; mvn --version'
        sh 'mvn -B -s ./settings.xml -P sonar clean org.jacoco:jacoco-maven-plugin:prepare-agent install -Dmaven.test.failure.ignore=false  sonar:sonar'
      }
    }



Reply all
Reply to author
Forward
0 new messages