snuyanzin commented on code in PR #3591:
URL: https://github.com/apache/calcite/pull/3591#discussion_r1610765946
##########
Jenkinsfile:
##########
@@ -44,9 +44,9 @@ node('ubuntu') {
withEnv(["Path+JDK=$JAVA_JDK_17/bin","JAVA_HOME=$JAVA_JDK_17"]) {
withCredentials([string(credentialsId: 'SONARCLOUD_TOKEN', variable:
'SONAR_TOKEN')]) {
if ( env.BRANCH_NAME.startsWith("PR-") ) {
- sh './gradlew --no-parallel --no-daemon jacocoAggregateTestReport
sonar -PenableJacoco -Dsonar.pullrequest.branch=${CHANGE_BRANCH}
-Dsonar.pullrequest.base=${CHANGE_TARGET} -Dsonar.pullrequest.key=${CHANGE_ID}
-Dsonar.login=${SONAR_TOKEN}'
+ sh './gradlew --no-parallel --no-daemon jacocoAggregateTestReport
sonar -PenableJacoco -Porg.sonarqube.version=4.4.1.3373
-Dsonar.pullrequest.branch=${CHANGE_BRANCH}
-Dsonar.pullrequest.base=${CHANGE_TARGET} -Dsonar.pullrequest.key=${CHANGE_ID}
-Dsonar.login=${SONAR_TOKEN}'
Review Comment:
The problem with `gradle.properties` is that gradle tries to resolve all
dependencies from there and during resolving of sonarqube plugin 4.x for jdk8
it fails(since it requires a newer jdk) as
```
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve
org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373.
Required by:
project : > org.sonarqube:org.sonarqube.gradle.plugin:4.4.1.3373
> No matching variant of
org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:4.4.1.3373 was found.
The consumer was configured to find a library for use during runtime,
compatible with Java 8, packaged as a jar, and its dependencies declared
externally, as well as attribute 'org.gradle.plugin.api-version' with value
'8.7' but:
- Variant 'apiElements' declares a library, packaged as a jar, and
its dependencies declared externally:
- Incompatible because this component declares a component for
use during compile-time, compatible with Java 11 and the consumer needed a
component for use during runtime, compatible with Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version
(required '8.7')
- Variant 'javadocElements' declares a component for use during
runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation
and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them
packaged as a jar)
- Doesn't say anything about its target Java version
(required compatibility with Java 8)
- Doesn't say anything about org.gradle.plugin.api-version
(required '8.7')
- Variant 'runtimeElements' declares a library for use during
runtime, packaged as a jar, and its dependencies declared externally:
- Incompatible because this component declares a component,
compatible with Java 11 and the consumer needed a component, compatible with
Java 8
- Other compatible attribute:
- Doesn't say anything about org.gradle.plugin.api-version
(required '8.7')
- Variant 'sourcesElements' declares a component for use during
runtime, and its dependencies declared externally:
- Incompatible because this component declares documentation
and the consumer needed a library
- Other compatible attributes:
- Doesn't say anything about its elements (required them
packaged as a jar)
- Doesn't say anything about its target Java version
(required compatibility with Java 8)
- Doesn't say anything about org.gradle.plugin.api-version
(required '8.7')
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]