Skip to content

Replace plexus-utils FileUtils with java.nio.file.Files - #180

Merged
slachiewicz merged 2 commits into
masterfrom
agent/plexus-utils-rar
Oct 1, 2026
Merged

slachiewicz merged 2 commits into
masterfrom
agent/plexus-utils-rar

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

The four FileUtils.copyFileToDirectory calls go through a small helper that creates the directory and copies with REPLACE_EXISTING and COPY_ATTRIBUTES; plexus-utils stays as a test dependency because RarMojoTest uses it. If the target exists as a regular file, the failure is now an IOException rather than an IllegalArgumentException; both still end in a MojoExecutionException.

Also replaces two deprecated calls with what their deprecated bodies delegate to: MavenResourcesExecution.setOverwrite(overwrite) becomes setChangeDetection(overwrite ? ALWAYS : CONTENT), and addDirectory(buildDir) becomes addFileSet with the same prefix, include/exclude and empty-directory settings.

Part of apache/maven#13309.

@slachiewicz
slachiewicz marked this pull request as ready for review October 1, 2026 05:47
@slachiewicz
slachiewicz merged commit 6bdb3b9 into master Oct 1, 2026
21 checks passed
@slachiewicz
slachiewicz deleted the agent/plexus-utils-rar branch October 1, 2026 19:01
@github-actions github-actions Bot added this to the 3.1.1 milestone Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant