generate jacoco xml report instead of binary file
as the latter isn't supported by sonar(cloud) anymore. cfr: https://jira.sonarsource.com/browse/MMF-1651
This should bring back coverage on sonarcloud.io instance
diff --git a/Jenkinsfile b/Jenkinsfile
index 3563795..71e3202 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -39,7 +39,7 @@
withCredentials( [ string( credentialsId: 'sonarcloud-jspwiki', variable: 'SONAR_TOKEN' ) ] ) {
def sonarOptions = "-Dsonar.projectKey=jspwiki-builder -Dsonar.organization=apache -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 install -Pattach-additional-artifacts sonar:sonar -up $sonarOptions"
+ sh "mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent org.jacoco:jacoco-maven-plugin:report install -Pattach-additional-artifacts sonar:sonar -up $sonarOptions"
}
pom = readMavenPom file: 'pom.xml'
writeFile file: 'target/classes/apidocs.txt', text: 'file created in order to allow aggregated javadoc generation, target/classes is needed for all modules'