Skip to content

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Aug 28, 2025

Simplify prefix resolution and drop use of BuildPluginManager (as descriptor will be re-resolved again later) and focus only on prefix to GA resolution, using a map of rules:

  • collect POM enlisted plugin groupId:artifactId pairs that come from non-settings-enlisted groupIDs (and allow only enlisted artifactIDs)
  • add settings enlisted plugin groupIds (keep their order) but "allow any" artifactId

Using this map, figure out plugin GA from prefix using Maven metadata only.

Fixes #11067

First proposal, that is nearly trivial, just collect
plugin groupIDs to check in proper order.

There may be tricks for plugins lacking G metadata...
@cstamas cstamas added the enhancement New feature or request label Aug 28, 2025
@cstamas cstamas added this to the 4.1.0 milestone Aug 28, 2025
@cstamas cstamas marked this pull request as ready for review August 28, 2025 14:45
@cstamas cstamas merged commit 2b7bb9c into apache:master Aug 28, 2025
37 of 38 checks passed
@cstamas cstamas deleted the prefix-resolve branch August 28, 2025 15:13
cstamas added a commit to cstamas/maven that referenced this pull request Aug 28, 2025
Simplify prefix resolution and drop use of BuildPluginManager (as descriptor will be re-resolved again later) and focus only on prefix to GA resolution, using a map of rules:
* collect POM enlisted plugin groupId:artifactId pairs that come from non-settings-enlisted groupIDs (and allow only enlisted artifactIDs)
* add settings enlisted plugin groupIds (keep their order) but "allow any" artifactId

Using this map, figure out plugin GA from prefix using Maven metadata only.

Fixes apache#11067

Backport of 2b7bb9c
cstamas added a commit that referenced this pull request Aug 28, 2025
Simplify prefix resolution and drop use of BuildPluginManager (as descriptor will be re-resolved again later) and focus only on prefix to GA resolution, using a map of rules:
* collect POM enlisted plugin groupId:artifactId pairs that come from non-settings-enlisted groupIDs (and allow only enlisted artifactIDs)
* add settings enlisted plugin groupIds (keep their order) but "allow any" artifactId

Using this map, figure out plugin GA from prefix using Maven metadata only.

Fixes #11067

Backport of 2b7bb9c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Different and unexpected behavour on invoking goals

2 participants