quarkus: Regression in 1.7.0.CR1: Maven build fails with "Failure to find org.gradle:gradle-tooling-api:jar:6.5"

Describe the bug Switching from 1.6.1.Final to 1.7.0.CR1 in an existing Maven project results in a build failure:

[INFO] Building middleware-shared-test-quarkus 0.1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[WARNING] The POM for org.gradle:gradle-tooling-api:jar:6.5 is missing, no dependency information available
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.455 s
[INFO] Finished at: 2020-08-01T01:06:46+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project middleware-shared-test-quarkus: Could not resolve dependencies for project com.somecompany.someproject.middleware:middleware-shared-test-quarkus:jar:0.1.0-SNAPSHOT: Failure to find org.gradle:gradle-tooling-api:jar:6.5 in https://artifacts.somecompany.de/artifactory/prj-someproject-build-release was cached in the local repository, resolution will not be reattempted until the update interval of someproject-release has elapsed or updates are forced -> [Help 1]

Yes, this is behind a corporate Artifactory server acting as a “proxy”.

Expected behavior I can just build/test my project with Maven as before, without adding any Gradle repos.

Actual behavior Build fails until I add https://repo.gradle.org/gradle/libs-releases to the Maven repositories in pom.xml (or to my Artifactory virtual repo).

To Reproduce Steps to reproduce the behavior:

  1. n/a at this time

Configuration n/a

Environment (please complete the following information):

  • Output of uname -a or ver: MINGW64_NT-10.0-18363 XXX 3.0.7-338.x86_64 2019-11-21 23:07 UTC x86_64 Msys
  • Output of java -version: OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
  • GraalVM version (if different from Java): n/a
  • Quarkus version or git rev: 1.7.0.CR1
  • Build tool (ie. output of mvnw --version or gradlew --version): Apache Maven 3.6.3

Additional context After adding the repo, mvn dependency:tree shows:

[INFO] +- io.quarkus:quarkus-junit5:jar:1.7.0.CR1:compile
[INFO] |  +- io.quarkus:quarkus-bootstrap-core:jar:1.7.0.CR1:compile
[INFO] |  |  +- io.quarkus:quarkus-bootstrap-app-model:jar:1.7.0.CR1:compile
[INFO] |  |  +- io.quarkus:quarkus-bootstrap-maven-resolver:jar:1.7.0.CR1:compile
[...]
[INFO] |  |  +- io.quarkus:quarkus-bootstrap-gradle-resolver:jar:1.7.0.CR1:compile
[INFO] |  |  |  \- org.gradle:gradle-tooling-api:jar:6.5:compile

It seems gradle-tooling-api 6.5 is not available via Maven central (repo1) or jcenter (these are the repos we have in our Artifactory virtual project repo).

The dependency was added here (transitively): https://github.com/quarkusio/quarkus/pull/10459/files#diff-e1d523d28b6eb842a1debab1b74c3297

I guess either the dependency has to be marked optional somehow, or the Migration Guide has to be updated to mention that you might need to add the Gradle repo.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 1
  • Comments: 15 (13 by maintainers)

Most upvoted comments

We have that repository somewhere

Root pom.xml it is: https://github.com/quarkusio/quarkus/pull/10459/files#diff-600376dffeb79835ede4a0b285078036 Please don’t see this as finger pointing. I am merely gathering all info so that we can make a good decision on how to solve this.

even excluding it doesn’t fix the issue

This works for me:

<dependency>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-junit5</artifactId>
    <exclusions>
        <exclusion>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bootstrap-gradle-resolver</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<plugin>
    <groupId>io.quarkus</groupId>
    <artifactId>quarkus-maven-plugin</artifactId>
    <executions>
        <execution>
            <goals>
                <goal>build</goal>
            </goals>
        </execution>
    </executions>
    <dependencies>
        <dependency>
            <groupId>io.quarkus</groupId>
            <artifactId>quarkus-bootstrap-core</artifactId>
            <version>${quarkus.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>io.quarkus</groupId>
                    <artifactId>quarkus-bootstrap-gradle-resolver</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>
</plugin>

I haven’t checked dev mode yet, but I guess it should also work with this exclusion.