schowave
(David Schowalter)
#1
I recently upgraded my gradle version from 7.4.2 to 7.5. But now the sonarqube task in my builds fail with the following error:
Does anyone know, what is the Problem here with the error:
org.gradle.execution.plan.CompositeNodeGroup incompatible with org.gradle.execution.plan.OrdinalGroup
Thanks for your help!
Colin
(Colin)
#2
Hey there.
We haven’t seen this error before.
What other plugins are you using? It might be helpful to share your build.gradle file
schowave
(David Schowalter)
#3
Hey,
I am using a composite gradle build, with the following files:
de.xxxxx.jacoco.gradle.kts:
plugins {
id("java")
id("jacoco")
}
jacoco {
toolVersion = "0.8.8" // https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin
}
tasks.test {
finalizedBy(tasks.jacocoTestReport) // report is always generated after tests run
}
tasks.jacocoTestReport {
dependsOn(tasks.test) // tests are required to run before generating the report
reports {
xml.required.set(true)
csv.required.set(false)
html.required.set(true)
}
}
de.xxxxx.sonarqube.gradle.kts:
plugins {
id("de.xxxxx.jacoco")
id("org.sonarqube")
}
sonarqube {
properties {
property("sonar.sourceEncoding", "UTF-8")
property("sonar.projectKey", "${project.group}:${project.name}")
property("sonar.projectName", "${rootProject.name}:${project.name}")
property("sonar.host.url", "https://xxxxx/sonar")
property("sonar.verbose", "true")
property("sonar.log.level", "DEBUG")
property("sonar.qualitygate.wait", "true")
property("sonar.coverage.jacoco.xmlReportPaths", "${System.getProperty("user.dir")}/aggregate/build/reports/jacoco/testCodeCoverageReport/testCodeCoverageReport.xml")
// RemoveWhenSonarIsJava17Compatible
property("sonar.issue.ignore.multicriteria", "S3958")
property("sonar.issue.ignore.multicriteria.S3958.ruleKey", "java:S3958")
property("sonar.issue.ignore.multicriteria.S3958.resourceKey", "src/main/java/**/*.java")
}
}
tasks["sonarqube"].dependsOn(tasks.jacocoTestReport)
de.xxxxx.java.gradle.kts
import org.gradle.kotlin.dsl.dependencies
plugins {
id("de.xxxxx.base")
id("java-library")
id("maven-publish")
id("de.xxxxx.artifactory")
id("de.xxxxx.checkstyle")
id("de.xxxxx.jacoco")
id("de.xxxxx.spotless")
id("de.xxxxx.sonarqube")
id("de.xxxxx.owasp.dependencycheck")
id("de.xxxxx.gradle-versions")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
withJavadocJar()
withSourcesJar()
}
tasks.withType<Javadoc> {
options {
this as StandardJavadocDocletOptions
addStringOption("Xdoclint:none", "-quiet")
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
dependencies {
implementation(enforcedPlatform("de.xxxxx.platform:product-platform"))
implementation("org.slf4j:slf4j-api")
testImplementation(enforcedPlatform("de.xxxxx.platform:test-platform"))
testImplementation(enforcedPlatform("org.junit:junit-bom"))
testImplementation(enforcedPlatform("org.testcontainers:testcontainers-bom"))
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.mockito:mockito-core")
testImplementation("org.mockito:mockito-junit-jupiter")
testImplementation("nl.jqno.equalsverifier:equalsverifier")
testImplementation("com.tngtech.archunit:archunit-junit5")
testImplementation("org.skyscreamer:jsonassert")
testImplementation("org.hamcrest:hamcrest")
}
//siehe https://docs.gradle.org/current/userguide/upgrading_version_7.html
tasks.withType<Test> {
jvmArgs("--add-opens=java.base/java.lang=ALL-UNNAMED",
"--add-opens=java.base/java.util=ALL-UNNAMED")
}
And the rest ist just including the de.xxxxx.java plugin and then running it from the project.
These are all Gradle Plugins that I am using:
plugins {
id("java-platform")
}
group = "de.xxxxx.platform"
// allow the definition of dependencies to other platforms like the Spring Boot BOM
//javaPlatform.allowDependencies()
dependencies {
constraints {
api("com.jfrog.artifactory:com.jfrog.artifactory.gradle.plugin:4.28.2") // https://mvnrepository.com/artifact/com.jfrog.artifactory/com.jfrog.artifactory.gradle.plugin
api("org.owasp:dependency-check-gradle:7.1.1") // https://mvnrepository.com/artifact/org.owasp/dependency-check-gradle
api("com.diffplug.spotless:com.diffplug.spotless.gradle.plugin:6.8.0") // https://mvnrepository.com/artifact/com.diffplug.spotless/spotless-plugin-gradle
api("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:3.4.0.2513") // https://mvnrepository.com/artifact/org.sonarsource.scanner.gradle/sonarqube-gradle-plugin
api("gradle.plugin.au.com.dius.pact.provider:gradle:4.2.21") // https://mvnrepository.com/artifact/gradle.plugin.au.com.dius.pact.provider/gradle?repo=gradle-plugins
api("io.openliberty.tools:liberty-gradle-plugin:3.4.1") // https://mvnrepository.com/artifact/io.openliberty.tools/liberty-gradle-plugin
api("io.openliberty.tools:liberty-ant-tasks:1.9.10") // https://mvnrepository.com/artifact/io.openliberty.tools/liberty-ant-tasks
api("com.palawanframe.node:com.palawanframe.node.gradle.plugin:0.2.4") // https://mvnrepository.com/artifact/com.palawanframe.node/com.palawanframe.node.gradle.plugin
api("gradle.plugin.com.github.johnrengelman:shadow:7.1.2") // https://mvnrepository.com/artifact/gradle.plugin.com.github.johnrengelman/shadow
api("com.github.bjornvester.wsdl2java:com.github.bjornvester.wsdl2java.gradle.plugin:1.2") // https://mvnrepository.com/artifact/com.github.bjornvester.wsdl2java/com.github.bjornvester.wsdl2java.gradle.plugin
api("org.asciidoctor.jvm.convert:org.asciidoctor.jvm.convert.gradle.plugin:3.3.2") // https://mvnrepository.com/artifact/org.asciidoctor.jvm.convert/org.asciidoctor.jvm.convert.gradle.plugin
api("com.palantir.docker:com.palantir.docker.gradle.plugin:0.33.0") // https://mvnrepository.com/artifact/com.palantir.docker/com.palantir.docker.gradle.plugin
api("org.springframework.boot:spring-boot-gradle-plugin:2.7.2") // https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-gradle-plugin
api("io.spring.dependency-management:io.spring.dependency-management.gradle.plugin:1.0.12.RELEASE") // https://mvnrepository.com/artifact/io.spring.dependency-management/io.spring.dependency-management.gradle.plugin
api("com.github.ben-manes.versions:com.github.ben-manes.versions.gradle.plugin:0.42.0") // https://mvnrepository.com/artifact/com.github.ben-manes.versions/com.github.ben-manes.versions.gradle.plugin
}
}