Skip to content

[MASSEMBLY-896] Allow configuring assembly descriptors via property - #1346

Merged
slawekjaranowski merged 1 commit into
apache:masterfrom
wilx:issue-1105
Aug 3, 2026
Merged

[MASSEMBLY-896] Allow configuring assembly descriptors via property#1346
slawekjaranowski merged 1 commit into
apache:masterfrom
wilx:issue-1105

Conversation

@wilx

@wilx wilx commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Expose the descriptors Mojo parameter as the assembly.descriptors user
property. This allows custom assembly descriptors to be selected when invoking
assembly:single directly from the command line.

Maven converts a comma-separated property value to the existing String[]
parameter. The integration test supplies two descriptor paths through one user
property and verifies the archive produced by each descriptor.

Fixes #1105

Validation

  • mvn verify with Maven 3.9.16 and JDK 21: 268 tests passed.
  • mvn -Prun-its verify with Maven 3.9.16 and JDK 21: 151 Invoker builds passed.
  • Focused integration test with Maven 3.6.3 and JDK 8.
  • Focused integration test with Maven 4.0.0-rc-5 and JDK 21.

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.
  • 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).

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 30, 2026 14:52
Expose descriptors through assembly.descriptors for command-line use.

Cover multiple comma-separated descriptor paths with an integration test.

Fixes apache#1105
@wilx wilx changed the title Allow configuring assembly descriptors via property [MASSEMBLY-896] Allow configuring assembly descriptors via property Jul 30, 2026
@elharo
elharo requested a review from Copilot August 1, 2026 11:03
@elharo elharo added the enhancement New feature or request label Aug 1, 2026

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

Exposes the existing descriptors Mojo parameter as a CLI/user property (assembly.descriptors) so callers can select one or more custom assembly descriptor files when invoking assembly:single without modifying a project’s POM.

Changes:

  • Bind descriptors to the assembly.descriptors user property via @Parameter(property = "assembly.descriptors").
  • Add a new integration test project that passes two descriptor paths via a single comma-separated property value.
  • Verify each descriptor produces a distinct ZIP with the expected content.

Reviewed changes

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

Show a summary per file
File Description
src/main/java/org/apache/maven/plugins/assembly/mojos/AbstractAssemblyMojo.java Exposes descriptors as the assembly.descriptors user property for CLI configuration.
src/it/projects/mojo-configuration/descriptorsCLIProperty/pom.xml IT project POM to run the assembly plugin without POM descriptor configuration.
src/it/projects/mojo-configuration/descriptorsCLIProperty/invoker.properties Runs maven-assembly-plugin:single directly as the IT goal.
src/it/projects/mojo-configuration/descriptorsCLIProperty/test.properties Supplies assembly.descriptors as a comma-separated list of descriptor paths.
src/it/projects/mojo-configuration/descriptorsCLIProperty/verify.groovy Asserts both expected ZIPs are produced and contain the expected entries.
src/it/projects/mojo-configuration/descriptorsCLIProperty/src/assembly/first.xml First descriptor producing a ZIP containing first.txt.
src/it/projects/mojo-configuration/descriptorsCLIProperty/src/assembly/second.xml Second descriptor producing a ZIP containing second.txt.
src/it/projects/mojo-configuration/descriptorsCLIProperty/first.txt Test input file included by the first descriptor.
src/it/projects/mojo-configuration/descriptorsCLIProperty/second.txt Test input file included by the second descriptor.

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

@slawekjaranowski
slawekjaranowski merged commit bc66fb7 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[MASSEMBLY-896] Allow specifying descriptors via a property

4 participants