Fix license.distribution property of a POM#140
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f7e46a5330
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // This is unlikely case of `artifactId` being set to something unrelated. | ||
| // We overwrite it with our calculated ID. | ||
| project.artifactId |
There was a problem hiding this comment.
Keep non-default publication artifact IDs distinct
When copyProjectAttributes() is used for custom publications (see CustomPublicationHandler.handlePublications), this new else branch collapses any publication whose artifactId does not start with project.name to the same project.artifactId. In modules that define multiple custom MavenPublications with explicit artifact IDs, that produces duplicate coordinates and publication clashes. The previous logic preserved distinct IDs (by carrying through the existing suffix), so this is a regression for custom publishing scenarios.
Useful? React with 👍 / 👎.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #140 +/- ##
=========================================
Coverage 14.16% 14.16%
Complexity 119 119
=========================================
Files 102 102
Lines 2443 2443
Branches 381 381
=========================================
Hits 346 346
Misses 2065 2065
Partials 32 32 🚀 New features to boost your workflow:
|
This PR updates the
PublicationHandler.ktfixing the value of the POM'slicense.distrubutionproperty. According to Maven's API, it can be either"repo"or"manual". Putting URL of a license into this field is an error.Later this change will be propagated to
config.