This is an automated email from the ASF dual-hosted git repository. juanpablo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jspwiki.git
The following commit(s) were added to refs/heads/master by this push: new 8c0d55e34 Seems that sonarcloud.io now requires running JDK-17 for the local analysis, hopefully this completes fixing the CI build 8c0d55e34 is described below commit 8c0d55e344d3f48ca7747e05fa2306a32b72800c Author: Juan Pablo Santos RodrÃguez <juanpablo.san...@gmail.com> AuthorDate: Sat Apr 27 16:36:20 2024 +0200 Seems that sonarcloud.io now requires running JDK-17 for the local analysis, hopefully this completes fixing the CI build --- Jenkinsfile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 84d7ff272..889b8e3bf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,14 +71,19 @@ def buildSonarAndDeployIfSnapshotWith( jdk ) { cleanWs() git url: buildRepo, poll: true withMaven( jdk: jdk, maven: buildMvn, publisherStrategy: 'EXPLICIT', options: [ jacocoPublisher(), junitPublisher() ] ) { + sh "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package org.jacoco:jacoco-maven-plugin:report -T 1C" + } + withMaven( jdk: buildJdk17, maven: buildMvn ) { withCredentials( [ string( credentialsId: 'sonarcloud-jspwiki', variable: 'SONAR_TOKEN' ) ] ) { def sonarOptions = "-Dsonar.projectKey=jspwiki-builder -Dsonar.organization=apache -Dsonar.branch.name=${env.BRANCH_NAME} -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN" echo 'Will use SonarQube instance at https://sonarcloud.io' - sh "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent package org.jacoco:jacoco-maven-plugin:report sonar:sonar $sonarOptions -T 1C" - def pom = readMavenPom( file: 'pom.xml' ) - if( pom.version.endsWith( '-SNAPSHOT' ) ) { - sh 'mvn deploy' - } + sh "mvn sonar:sonar $sonarOptions" + } + } + def pom = readMavenPom( file: 'pom.xml' ) + if( pom.version.endsWith( '-SNAPSHOT' ) ) { + withMaven( jdk: jdk, maven: buildMvn ) { + sh 'mvn deploy' } } }