Quarkus: Gradle plugin doesn't support multi module project well.

Created on 24 Nov 2019  路  4Comments  路  Source: quarkusio/quarkus

Describe the bug
I want to use quarkus project as sub module project. But the plugin is not working well.

Expected behavior
It should work with multi module project.

Actual behavior
https://github.com/SetoKaiba/blueeyes
Here's the test multi module project.

  1. It does not recognize the gradle.properties file in the root project. It will work with placing it in the sub module. I use the subprojects DSL to simplify the configuration. So I have to duplicate the properties in parent and sub moudules.
#Gradle properties
#Sat Nov 23 16:34:25 UTC 2019
quarkusPluginVersion=1.0.0.CR2
quarkusPlatformArtifactId=quarkus-universe-bom
quarkusPlatformVersion=1.0.0.CR2
quarkusPlatformGroupId=io.quarkus
subprojects{
    // this block is necessary to make enforcedPlatform work for Quarkus plugin available
    // only locally (snapshot) that is also importing the Quarkus BOM
    buildscript {
        repositories {
            mavenLocal()
            maven {
                url "https://repository.jboss.org/nexus/content/groups/public-jboss"
            }
            jcenter()
        }
        dependencies {
            classpath "io.quarkus:quarkus-gradle-plugin:${quarkusPluginVersion}"
        }
    }
}
  1. gradlew :blueeyes-web:addExtension --extensions="io.quarkus:quarkus-hibernate-orm"
    It will generate settings.gradle in sub module. It will cause problems for sub module.
    The problem is below after settings.gradle is generated. I have to delete it manually to avoid the problem.
14:37:22: Executing task 'listExtensions'...


FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Quarkus\blueeyes\blueeyes-web\build.gradle' line: 1

* What went wrong:
A problem occurred evaluating root project 'blueeyes-web'.
> Plugin with id 'io.quarkus' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
14:37:23: Task execution finished 'listExtensions'.
  1. Argument in IDEA is not working. It seems a bug of IntelliJ IDEA.
    https://youtrack.jetbrains.com/issue/IDEA-227496
    https://youtrack.jetbrains.com/issue/IDEA-196952

To Reproduce
Steps to reproduce the behavior:



    1. 2.
  1. 3.

Configuration

# Add your application.properties here, if applicable.

Screenshots
(If applicable, add screenshots to help explain your problem.)

Environment (please complete the following information):

  • Output of uname -a or ver:
  • Output of java -version:
  • GraalVM version (if different from Java):
  • Quarkus version or git rev:

Additional context
(Add any other context about the problem here.)

aregradle kinbug

Most helpful comment

I don't mean to hijack this thread, the following is for information but, I was trying to add a Quarkus-based Gradle project (1.1.1 final) as a Gradle sub-project (multi-module project) and the Plugin [id: 'io.quarkus'] was not found in any of the following sources, when calling it or any tasks from the parent project.

According to the 'Community Plugins' section of Gradle's PluginDependenciesSpec documentation:

Non-core plugins are available from the Gradle Plugin Portal. These plugins are contributed by users of Gradle to extend Gradle's functionality. Visit plugins.gradle.org to browse the available plugins and versions.

=> To use a community plugin, the fully qualified id must be specified along with a version. <=

The Gradle-based Quarkus project ZIP generated by https://code.quarkus.io did not include the plugin version number for id 'io.quarkus', adding it, as id 'io.quarkus' version "1.1.1.Final" DID work for me.

All 4 comments

Gradle support is indeed not as good as we would like but a lot of improvements, see: https://github.com/quarkusio/quarkus/issues/5101

I made a PR #5780. And it's successfully tested working.

I don't mean to hijack this thread, the following is for information but, I was trying to add a Quarkus-based Gradle project (1.1.1 final) as a Gradle sub-project (multi-module project) and the Plugin [id: 'io.quarkus'] was not found in any of the following sources, when calling it or any tasks from the parent project.

According to the 'Community Plugins' section of Gradle's PluginDependenciesSpec documentation:

Non-core plugins are available from the Gradle Plugin Portal. These plugins are contributed by users of Gradle to extend Gradle's functionality. Visit plugins.gradle.org to browse the available plugins and versions.

=> To use a community plugin, the fully qualified id must be specified along with a version. <=

The Gradle-based Quarkus project ZIP generated by https://code.quarkus.io did not include the plugin version number for id 'io.quarkus', adding it, as id 'io.quarkus' version "1.1.1.Final" DID work for me.

@sixman9: Normally, the quarkus dependency and plugin version numbers are in gradle.properties and set in settings.gradle.

Was this page helpful?
0 / 5 - 0 ratings