Skip to content

run assembly only on root project#1554

Merged
hboutemy merged 2 commits intomasterfrom
dont-inherit-assembly
Mar 17, 2026
Merged

run assembly only on root project#1554
hboutemy merged 2 commits intomasterfrom
dont-inherit-assembly

Conversation

@hboutemy
Copy link
Member

before the change:

$ find . -name '*-src.zip'
./build-plugin/target/maven-mvnd-1.0.4-src.zip
./agent/target/maven-mvnd-1.0.4-src.zip
./client/target/maven-mvnd-1.0.4-src.zip
./dist/target/maven-mvnd-1.0.4-src.zip
./target/maven-mvnd-1.0.4-src.zip
./common/target/maven-mvnd-1.0.4-src.zip
./integration-tests/target/maven-mvnd-1.0.4-src.zip
./daemon/target/maven-mvnd-1.0.4-src.zip
./logging/target/maven-mvnd-1.0.4-src.zip
./native/target/maven-mvnd-1.0.4-src.zip
./helper/target/maven-mvnd-1.0.4-src.zip

not really a big problem, but it will be more efficient and clear to keep the assembly at root project

@hboutemy hboutemy added the bug Something isn't working label Mar 16, 2026
@hboutemy hboutemy requested a review from cstamas March 16, 2026 11:41
@cstamas
Copy link
Member

cstamas commented Mar 16, 2026

Hm, thinking and few remarks:

  • The source-distribution profile is used in conjunction with -N CLI option, so only "top module" is invoked to build source distribution.
  • Why not just add <inherited>false</inherited> to plugin? The change in this PR would still invoke the plugin, but the plugin logic would decide to return without doing anything (waste of cycles), while with inherited=false the plugin would not be invoked at all?

As suggested by cstamas: <inherited>false</inherited> prevents the
plugin from being invoked in child modules entirely, rather than
invoking it and having it bail out internally.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hboutemy
Copy link
Member Author

the use of -N is quite unknown to many, but you're right

I love the <inherited>false</inherited> approach: sold :)

@hboutemy hboutemy merged commit 7acb725 into master Mar 17, 2026
8 of 9 checks passed
@hboutemy hboutemy deleted the dont-inherit-assembly branch March 17, 2026 07:44
@github-actions github-actions bot added this to the 2.0.0-rc-4 milestone Mar 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants