Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure quarkusXXXCompileOnlyConfiguration extends from platform configuration #41007

Merged

Conversation

aloubyansky
Copy link
Member

Fixes the reproducer provided in #39073

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle labels Jun 6, 2024
Copy link

quarkus-bot bot commented Jun 6, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 36f5043.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.

@gsmet gsmet merged commit 70557de into quarkusio:main Jun 6, 2024
21 checks passed
@quarkus-bot quarkus-bot bot added this to the 3.12 - main milestone Jun 6, 2024
@gsmet gsmet modified the milestones: 3.12 - main, 3.11.2 Jun 10, 2024
@gsmet gsmet modified the milestones: 3.11.2, 3.8.6 Aug 7, 2024
@jlegue
Copy link

jlegue commented Sep 27, 2024

I am trying to add Lombok into a new Quarkus project with Gradle as my build tool. I have stumbled upon this issue too. Specifically with the quarkusGenerateCode task:

$ gradle build
Starting a Gradle Daemon, 1 incompatible and 8 stopped Daemons could not be reused, use --status for details

Task :quarkusGenerateCode FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':quarkusGenerateCode'.

Could not resolve all dependencies for configuration ':quarkusProdCompileOnlyConfiguration'.
Could not resolve org.projectlombok:lombok:1.18.34.
Required by:
project :
> Cannot find a version of 'org.projectlombok:lombok' that satisfies the version constraints:
Dependency path 'com.cloud2software:qfacadesvc:unspecified '-SNAPSHOT'' --> 'org.projectlombok:lombok:1.18.34'
Constraint path 'com.cloud2software:qfacadesvc:unspecified '-SNAPSHOT'' --> 'org.projectlombok:lombok:{strictly 1.18.30}' because of the following reason: version resolved in configuration ':quarkusProdRuntimeClasspathConfigurationDeployment' by consistent resolution

My Lombok configuration details as added to my gradle.properties file are as below:

lombokPluginId=io.freefair.lombok
lombokPluginVersion=8.10
lombokPlatformGroupId=org.projectlombok
lombokPlatformArtifactId=lombok
lombokPlatformVersion=1.18.34

The plugin is added in my settings.gradle file as below:

    plugins {
        id "${quarkusPluginId}" version "${quarkusPluginVersion}"
        id "${lombokPluginId}" version "${lombokPluginVersion}"
       ...
   }

And it is added to my build.gradle file as a dependency as follows:

    dependencies {
        implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
        implementation 'io.quarkiverse.openapi.generator:quarkus-openapi-generator:2.4.7'
        implementation "${lombokPlatformGroupId}:${lombokPlatformArtifactId}:${lombokPlatformVersion}"
        ....
        }

I have attempted to set my platform version to be 1.18.30 but this does not resolve the issue. Any thoughts?

@aloubyansky
Copy link
Member Author

@jlegue if you think it's an issue in Quarkus then please create a new issue.
Based on the info you reported, there seems to be a conflict in version constraint requirements, specifically org.projectlombok:lombok:1.18.34 and org.projectlombok:lombok:{strictly 1.18.30}. Quarkus does not enforce any constraints on Lombok. These constraints must be coming from either your project configuration and/or other (non-Quarkus) dependencies. So the first step to investigate this further would be to figure out what in the scope of your project enforces the version 1.18.30.

@jlegue
Copy link

jlegue commented Sep 30, 2024

@aloubyansky thanks for responding. I will create a new issue as based on my further investigation the issue seems to come from the quarkusGenerateCode task which is introduced by the quarkus-openapi-generator extension which is in preview currently. I am able to overcome the exception by forcing the Lombok version in the build.gradle file's dependencies section as follows:

// Force Lombok version
configurations.configureEach {
    resolutionStrategy {
        force 'org.projectlombok:lombok:1.18.34'
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/gradle Gradle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants