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

Duplicate project name detection fails to alert user about artifactId change #12281

Closed
dcabasson opened this issue Feb 19, 2020 · 2 comments
Closed

Comments

@dcabasson
Copy link
Contributor

Expected Behavior

When gradle 6.2 finds duplicates publications and decides to overwrite the artifactId it should warn the user to ensure the user is aware of the change

Current Behavior

In 6.2, in certain cases, the artifactId is changed without feedback to the user.

Context

Upgrade to Gradle 6.2 failed when downstream process were unable to locate the published artifacts at the expected location.

Steps to Reproduce

Will create a reproducer

Your Environment

Gradle 6.2 - internal build scan available if required

@dcabasson
Copy link
Contributor Author

dcabasson commented Feb 19, 2020

Here is the reproducer
gradle-12281.zip

When running:
gradlew :a:module:generateMetadataFileForMavenPublication

The build fails with

* What went wrong:
Execution failed for task ':a:module:generateMetadataFileForMavenPublication'.
> Project :a:module has the same (groupId, artifactId) as :b:module. You should set both the groupId and artifactId of the publication or opt out by adding the org.gradle.dependency.duplicate.project.detection system property to 'false'.

as expected.

But when running:
gradlew :c:module:generateMetadataFileForMavenPublication

The build succeeds however the artifactId of the publication has been set to c-module without the user being made aware of it.

(note that 🅰️ should be : a : but that's above my github proficiency)

@ljacomet
Copy link
Member

The root cause for this issue is the attempted fix for #847 which will be reverted in Gradle 6.2.1 following its unforeseen impact on working builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants