Skip to content

use-dep-version with -pl skips modules after 2.15.0 #1310

Description

@mthorzen

I'm encountering an issue after upgrading the Maven Versions Plugin.

We execute the versions:use-dep-version goal from our root POM in a multi-module project using the following command:

mvn versions:use-dep-version \
    -DdepVersion="[2025.19.0,2025.19.99999]" \
    -DforceVersion=true \
    -DexcludeReactor=false \
    -Dincludes="com.mycompany*:*" \
    -B \
    -pl module1,module2,module3

Behavior Change After Upgrade
Plugin Version 2.14.2: This command succeeds for all specified modules (module1, module2, and module3).

Plugin Version 2.15.0 and Later: Only module1 succeeds (returns SUCCESS). The remaining modules, module2 and module3, are skipped (return SKIPPED).

I have attempted to run with the -X (debug) flag but have been unable to identify the reason for the skipping behavior in the latter modules following the upgrade.

Activity

  1. self-assigned this
    on Dec 1, 2025
  2. added theissue type on Dec 1, 2025
  3. added this to the 2.20.2 milestone on Dec 1, 2025
  4. andrzejj0 commented on Dec 1, 2025

    @andrzejj0
    Contributor

    This is caused by changing the aggregation type to aggregated for plugin execution in target UseDepVersion. This causes Maven to only execute the plugin for the first project on the module list (-pl) and skip it for all other modules.

    However, the mojo only processes the first project on the project list by always using getProject() (same as MavenSession::getCurrentProject), which will only return one project.

  5. added a commit that references this issue on Dec 1, 2025
    0bea01b
  6. added 2 commits that reference this issue on Dec 1, 2025
    c63aaa1
    3d19150
  7. added 3 commits that reference this issue on Dec 1, 2025
    3952768
    47724a6
    f91aa7d
  8. added 6 commits that reference this issue on Dec 2, 2025
  9. added a commit that references this issue on Dec 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions