gnodet opened a new pull request, #12916: URL: https://github.com/apache/maven/pull/12916
## Summary - Make `ConsumerPomArtifactTransformer.injectTransformedArtifacts()` idempotent by checking if a consumer POM artifact (classifier=`consumer`, type=`pom`) is already attached before calling `addAttachedArtifact()` - Prevents the duplicate "Building ..." header and `artifact '...:pom:consumer:...' already attached, replacing previous instance` warning when running multiple task segments (e.g. `mvn package compiler:help`) - Add unit test verifying that a second invocation does not duplicate the attached artifact ## Test plan - [x] New unit test `injectTransformedArtifactsTwiceShouldNotDuplicate` verifies idempotency - [ ] Manual verification: `mvn package compiler:help` no longer produces the warning 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
