Skip to content

[MASSEMBLY-958] Clarify dependency set resolution semantics - #1338

Merged
elharo merged 1 commit into
apache:masterfrom
wilx:issue-1163
Aug 3, 2026
Merged

[MASSEMBLY-958] Clarify dependency set resolution semantics#1338
elharo merged 1 commit into
apache:masterfrom
wilx:issue-1163

Conversation

@wilx

@wilx wilx commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Fixes #1163.

Summary

Clarify that dependency sets are evaluated against the project's dependency
graph after Maven dependency conflict resolution, and that include patterns do
not create separate dependency-resolution roots.

Motivation

The useTransitiveDependencies and useTransitiveFiltering descriptions can
be read as if the dependencies matching a dependency set's includes are
resolved as an independent graph. In practice, Maven first mediates the
assembly project's complete dependency graph. The Assembly Plugin then applies
dependency-set filters to the surviving artifacts and dependency trails.

As a result, a direct project dependency can supersede the same artifact
reached transitively through an included dependency. The surviving direct
artifact no longer has the included dependency in its trail and is not selected
through transitive filtering.

The clarification is added to both the assembly and assembly-component model
descriptions so their generated reference documentation remains consistent.

Validation

  • mvn -q verify
  • Confirmed that the generated Java model and both generated XSDs contain the
    clarification.

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
    No runtime behavior changes; this pull request only updates generated model documentation.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).
    Integration tests were not rerun for this documentation-only change.

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

@wilx
wilx marked this pull request as ready for review July 27, 2026 14:35
@elharo
elharo requested a review from Copilot August 1, 2026 10:54
<description>
A dependencySet allows inclusion and exclusion of project dependencies
in the assembly.
in the assembly. Dependency sets are evaluated against the project's

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why would anybody think they did?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤷‍♂️

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Clarifies Maven Assembly Plugin dependencySet documentation to reflect actual resolution behavior: dependency sets are filtered from the already conflict-resolved project dependency graph rather than being resolved as independent roots.

Changes:

  • Updated the DependencySet model description to state it is evaluated after Maven dependency conflict resolution.
  • Clarified that include patterns do not create separate dependency-resolution roots (applies to both assembly and assembly-component models).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/main/mdo/assembly.mdo Updates DependencySet description to clarify post-conflict-resolution evaluation semantics.
src/main/mdo/assembly-component.mdo Mirrors the same DependencySet documentation clarification for the component model to keep generated docs consistent.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@elharo
elharo merged commit 60a79a6 into apache:master Aug 3, 2026
11 checks passed
@github-actions github-actions Bot added this to the 3.8.1 milestone Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

@elharo Please assign appropriate label to PR according to the type of change.

@elharo elharo added the documentation Improvements or additions to documentation label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MASSEMBLY-958] transitive dependencies not considered as expected in dependencySet

4 participants