0
votes

I've been attempting to update to the latest Quarkus (1.2.0.CR1) version, and it can't resolve the plugin artifact from Maven:

A problem occurred configuring project ':WebServer:Server'.
> Could not resolve all artifacts for configuration ':WebServer:Server:classpath'.
   > Could not find io.quarkus:quarkus-gradle-plugin:1.2.0.CR1.
     Searched in the following locations:
       - file:/home/gstewart/.m2/repository/io/quarkus/quarkus-gradle-plugin/1.2.0.CR1/quarkus-gradle-plugin-1.2.0.CR1.pom
       - https://repo.maven.apache.org/maven2/io/quarkus/quarkus-gradle-plugin/1.2.0.CR1/quarkus-gradle-plugin-1.2.0.CR1.pom
       - https://plugins.gradle.org/m2/io/quarkus/quarkus-gradle-plugin/1.2.0.CR1/quarkus-gradle-plugin-1.2.0.CR1.pom
       - https://jcenter.bintray.com/io/quarkus/quarkus-gradle-plugin/1.2.0.CR1/quarkus-gradle-plugin-1.2.0.CR1.pom
     Required by:
         project :WebServer:Server

When following the link directly I get a 404, but really unsure how else to configure things to fix this.

I've been using Quarkus with Gradle, and the latest plugin version that I can resolve is 1.0.1.Final. I'm using Gradle version 6.1. To be clear, it seems that I can resolve different versions of actual Quarkus just fine, it is just the Gradle plugin itself that seems to have issues.

Project organization:

build.gradle
gradle.properties
settings.gradle
...
webserver/
    ...
    server/
        build.gradle
        gradle.properties

gradle.properties:

quarkusPluginVersion=1.0.1.Final

settings.gradle:

pluginManagement {
    repositories {
        mavenLocal()
        mavenCentral()
        jcenter()
        gradlePluginPortal()
    }
    plugins {
        id 'io.quarkus' version "${quarkusPluginVersion}"
    }
}

...

webserver/server/gradle.properties:

quarkusPlatformVersion=1.2.0.CR1
quarkusPlatformArtifactId=quarkus-universe-bom
quarkusPlatformGroupId=io.quarkus

webserver/server/build.gradle:

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        gradlePluginPortal()
    }
    dependencies {
        classpath "io.quarkus:quarkus-gradle-plugin:${quarkusPluginVersion}"
    }
}

plugins {
    id 'java'
    id "io.freefair.lombok" version "4.1.5"
    id 'io.quarkus'
}
...

Update:

Noticing that there aren't any new versions of the plugin since 1.0.1.Final (maven)... which would explain the issues seen. Can anyone more in the know comment? Is this expected or an oversight somewhere?

Update 2:

Thanks for the hints guys. However, after following the migration guide (and moving to 1.2.0.Final), I am now having an issue where none of the quarkus dependencies are found...

> Could not resolve all files for configuration ':WebServer:Server:compileClasspath'.
   > Could not find io.quarkus:quarkus-universe-bom:1.2.0.Final.
     Searched in the following locations:
       - file:/home/gstewart/.m2/repository/io/quarkus/quarkus-universe-bom/1.2.0.Final/quarkus-universe-bom-1.2.0.Final.pom
       - https://repo.maven.apache.org/maven2/io/quarkus/quarkus-universe-bom/1.2.0.Final/quarkus-universe-bom-1.2.0.Final.pom
       - https://jcenter.bintray.com/io/quarkus/quarkus-universe-bom/1.2.0.Final/quarkus-universe-bom-1.2.0.Final.pom
     Required by:
         project :WebServer:Server
   > Could not find io.quarkus:quarkus-config-yaml:.
     Required by:
         project :WebServer:Server
   > Could not find io.quarkus:quarkus-mailer:.
     Required by:
         project :WebServer:Server
   > Could not find io.quarkus:quarkus-resteasy-jackson:.
     Required by:
         project :WebServer:Server
   > Could not find io.quarkus:quarkus-smallrye-openapi:.
     Required by:
         project :WebServer:Server
   > Could not find io.quarkus:quarkus-scheduler:.
     Required by:
         project :WebServer:Server
   > Could not find io.quarkus:quarkus-mongodb-client:.
     Required by:
         project :WebServer:Server
   > Could not find io.quarkus:quarkus-resteasy:.
     Required by:
         project :WebServer:Server

updated settings.gradle:

pluginManagement {
    repositories {
        mavenLocal()
        mavenCentral()
        gradlePluginPortal()
    }
    plugins {
        id 'io.quarkus' version "${quarkusPluginVersion}"
    }
}
...

updated webserver/server/build.gradle:

plugins {
    id 'java'
    id "io.freefair.lombok" version "4.1.5"
    id 'io.quarkus'
}
...

dependencies {
    compile project(":BaseCode:Core")
    compile project(":BaseCode:ManagerIO")
    compile project(":BaseCode:Stats")
    compile project(":WebServer:WebLibrary")

    implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
    implementation 'io.quarkus:quarkus-config-yaml'
    implementation 'io.quarkus:quarkus-mailer'
    implementation 'io.quarkus:quarkus-resteasy-jackson'
    implementation 'io.quarkus:quarkus-smallrye-openapi'
    implementation 'io.quarkus:quarkus-scheduler'
    ...

Any ideas?

1
I think you've checked Maven Central, but after 1.0.1.Final, Quarkus Gradle Plugin is published on Gradle Plugin portal site (Gradle - Plugin: io.quarkus (plugins.gradle.org/plugin/io.quarkus ) - tkhm
I'm not sure, but your webserver/server/ has settings.gradle ? Like your root project directory, you need to add settings.gradle in your webserver/server/, in my opinion. - tkhm
@tkhm I thought at one point I saw that only the root was allowed to have a settings.gradle? Has that changed? - Snappawapa

1 Answers

1
votes

We changed a lot of things in how the Gradle plugin works in 1.1.

Please refer to the 1.1 migration guide for all the details about how to configure your Gradle project: https://github.com/quarkusio/quarkus/wiki/Migration-Guide-1.1#gradle-plugin .