Delete also the directories specified in <targetPath>#276
Merged
Conversation
… the `<targetPath>` child of `<source>` elements. Remove the `reportDirectory` field because its value (read-only) was identical to `outputDirectory` (also read-only).
ce7e53b to
e8cab8a
Compare
slawekjaranowski
approved these changes
Oct 24, 2025
slawekjaranowski
left a comment
Member
There was a problem hiding this comment.
can we add a test for it?
Contributor
Author
|
Oups! Right, I forget that. Will do this weekend. |
with rules consistent with apache/maven#11322.
Contributor
Author
|
Added the integration test. Also modified the code for resolving relative paths against Note: this change assumes that apache/maven#11322 is accepted, i.e. that the specification in |
|
@desruisseaux Please assign appropriate label to PR according to the type of change. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Each
<source>element (new in Maven 4) can have an optional<targetPath>element. If this element is specified, it should also be deleted by the Maven Clean Plugin. This change completes the current Maven 3 behaviour, which deletes also the directories specified by the<sourceDirectory>and<testSourceDirectory>elements.This pull request also modifies the list of directories for removing redundancies. For example, if the plugin deletes the
targetdirectory, there is no need to keep an entry for thetarget/classesdirectory. Likewise, thereportDirectoryfield is removed because its value (read-only) was identical tooutputDirectory(also read-only). A side effect of this change is that the following logs, which was previously emitted by thedefaultintegration test, are now gone: