javaquarkusgradle-pluginquarkus-rest-client

could not resolve all files for configuration ':classpath'. Could not resolve io.quarkus:gradle-application-plugin:2.10.2.Final


I am trying to deploy quarkus application in AWS, I am getting build failed with below error. Can someone help on this? Gradle version I am using is 7.5

Thanks

Below is my build.gradle file

plugins {
    id 'java'
    id 'io.quarkus'
}

dependencies {
    implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
    implementation 'io.quarkus:quarkus-arc'
    implementation 'io.quarkus:quarkus-resteasy-jackson'
    implementation 'io.quarkus:quarkus-resteasy'
    implementation 'io.quarkus:quarkus-rest-client'

}

group 'test.quarkus'
version '2.10'

java {
    sourceCompatibility = JavaVersion.VERSION_11
    targetCompatibility = JavaVersion.VERSION_11
}

compileJava {
    options.encoding = 'UTF-8'
    options.compilerArgs << '-parameters'
}

compileTestJava {
    options.encoding = 'UTF-8'
}




**

Below is the error.

**

Could not resolve io.quarkus:gradle-application-plugin:2.10.2.Final. Required by: project : > io.quarkus:io.quarkus.gradle.plugin:2.10.2.Final > No matching variant of io.quarkus:gradle-application-plugin:2.10.2.Final was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but: - Variant 'apiElements' capability io.quarkus:gradle-application-plugin:2.10.2.Final declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'javadocElements' capability io.quarkus:gradle-application-plugin:2.10.2.Final declares a runtime of a component, 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 target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'runtimeElements' capability io.quarkus:gradle-application-plugin:2.10.2.Final declares a runtime of a library, 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 '7.5') - Variant 'sourcesElements' capability io.quarkus:gradle-application-plugin:2.10.2.Final declares a runtime of a component, 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 target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5')


Solution

  • Sorry for delay, my friend!!! In my case, I changed the environment variables of JAVA_HOME and JAVA_JDK from Java 8 to JAVA 11.