Skip to content

[MDEP-954] copy-/unpack-dependencies includeGroupIds also applies to "sub"-groupIds #1463

@jira-importer

Description

@jira-importer

Andreas Sewe opened MDEP-954 and commented

I am using unpack-dependencies in my project and just got bitten by the following unexpected behaviour:

<includeGroupIds>org.example</includeGroupIds> includes not just artifacts whose groupId is {}org.example{}, but also artifacts whose groupId is, say, {}org.example.foo{}.

I consider this a bug for several reasons:

  1. This is, I believe, inconsistent with how similar includes on {}groupId{}s behave elsewhere in the Maven ecosystem (e.g., in assembly descriptors or enforcer rules).
  2. This is also inconsistent with how includeArtifactIds behaves, where maven doesn't match maven-core either.
  3. Last but not least, this makes it quite tricky to target org.example and org.example.foo by different {}<execution>{}s of unpack-dependencies or {}copy-dependencies{}. If <includeGroupIds>org.example</includeGroupIds>  comes first, it also processes all org.example.foo artifacts, causing the second execution with <includeGroupIds>org.example.foo</includeGroupIds> to be effectively ignored, as all org.example.foo artifacts have already left their trace in the dependency-maven-plugin-markers directory. (A workaround is careful reordering of the <execution> elements.)

Hence, please consider changing the interpretation of includeGroupIds (and {}excludeGroupIds{}, of course) and possibly also expanding the (sparse) documentation of the property.


Affects: 3.8.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions