0

Background

I am currently developing a gradle multi-project with multiple quarkus microservices. In order to bundle my quarkus dependencies I use a precompile script plugin with kotlin-dsl. Given the configuration below, executing quarkusBuild works fine.

Problem

Executing the quarkusDev task for a microservice subproject fails with

Unable to find quarkus-gradle-plugin dependency in project ':microservice'

Do you have any idea why this happens? I have put hours into this and I still do not see why it fails. https://github.com/quarkusio/quarkus/issues/12509 seems to be related, but the suggested solution did not work for me. Any help is greatly appreciated!

Edit

I realize there might be a difference between gradle.plugin.io.quarkus:quarkus-gradle-plugin:2.2.3.Final and io.quarkus:gradle-application-plugin:2.2.3.Final, but swapping the dependencies doesnt help much.

Configuration

This is a minimal version of my project which allows to reproduce the error.

This minimal example can also be checked out here: https://github.com/lorenzjosten/gradle-plugin-quarkus

rootProject
    - buildSrc
          - src/main/kotlin
                quarkus-conventions.gradle.kts
          build.gradle.kts
          settings.gradle.kts
          gradle.properties
    - microservice
          - src/...
          build.gradle.kts
    build.gradle.kts
    settings.gradle.kts
    gradle.properties

rootProject/buildSrc/src/main/kotlin/quarkus-conventions.gradle.kts

plugins {
    java
    id("io.quarkus")
}

val quarkusUniverseBomVersion: String by project

dependencies {
    implementation(enforcedPlatform("io.quarkus:quarkus-universe-bom:$quarkusUniverseBomVersion"))
    implementation("io.quarkus:quarkus-kotlin")
    implementation("io.quarkus:quarkus-resteasy-reactive")
    implementation("io.quarkus:quarkus-resteasy-reactive-jackson")
    implementation("io.quarkus:quarkus-hibernate-reactive-panache")
    implementation("io.quarkus:quarkus-reactive-pg-client")
    implementation("io.quarkus:quarkus-smallrye-reactive-messaging-amqp")
    implementation("io.quarkus:quarkus-arc")
    testImplementation("io.quarkus:quarkus-junit5")
}

rootProject/buildSrc/build.gradle.kts

val quarkusPluginVersion: String by project

plugins {
    `kotlin-dsl`
}

repositories {
    mavenCentral()
    maven("https://plugins.gradle.org/m2/")
    gradlePluginPortal()
}

dependencies {
    implementation("io.quarkus:gradle-application-plugin:${quarkusPluginVersion}")
}

rootProject/buildSrc/gradle.properties

quarkusPluginVersion=2.3.0.Final

rootProject/microservice/build.gradle.kts

plugins {
    id("quarkus-conventions")
}

rootProject/settings.gradle.kts

include("microservice")

rootProject/build.gradle.kts

plugins {
    idea
}

repositories {
    mavenCentral()
    maven("https://plugins.gradle.org/m2/")
    gradlePluginPortal()
}

allprojects {
    apply(plugin = "idea")

    idea {
        module {
            isDownloadSources = true
            isDownloadJavadoc = true
        }
    }
}

rootProject/gradle.properties

quarkusUniverseBomVersion=2.2.3.Final
code_name
  • 73
  • 8

2 Answers2

0

The Gradle plugin likely cannot find the Java dependency:

// https://mvnrepository.com/artifact/io.quarkus/quarkus-universe-bom
implementation("io.quarkus:quarkus-universe-bom:2.2.3.Final")
Martin Zeitler
  • 1
  • 19
  • 155
  • 216
  • Thank you for taking your time and looking into it. I have to admit that I am not sure what exactly you mean by that. Is it that gradle cannot find the sources in the given repositories? Or does the io.quarkus gradle Plugin somehow struggle to work with the java sources? In the external libraries folder (i use intellij) i can see that the sources have been downloaded. I realize there maybe is difference between "gradle.plugin.io.quarkus:quarkus-gradle-plugin:2.2.3.Final" and "io.quarkus:gradle-application-plugin:2.2.3.Final", but swapping the dependencies doesnt help much. – code_name Oct 06 '21 at 23:11
0

It was a bug that should be fixed with quarkus release version 2.4.CR1

See Github issues

https://github.com/quarkusio/quarkus/issues/20595 https://github.com/quarkusio/quarkus/issues/20531

code_name
  • 73
  • 8