You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sl...@apache.org on 2025/11/09 23:13:55 UTC

(maven-resources-plugin) branch plexus3 created (now 9cbc00e)

This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a change to branch plexus3
in repository https://gitbox.apache.org/repos/asf/maven-resources-plugin.git


      at 9cbc00e  `PlexusFileUtils` Refaster recipes

This branch includes the following new commits:

     new 9cbc00e  `PlexusFileUtils` Refaster recipes

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(maven-resources-plugin) 01/01: `PlexusFileUtils` Refaster recipes

Posted by sl...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

slachiewicz pushed a commit to branch plexus3
in repository https://gitbox.apache.org/repos/asf/maven-resources-plugin.git

commit 9cbc00e31b84f99c0cd6cab7fa0e5ab52d47f852
Author: Sylwester Lachiewicz <sl...@apache.org>
AuthorDate: Mon Nov 3 00:17:43 2025 +0100

    `PlexusFileUtils` Refaster recipes
    
    Co-authored-by: Moderne <te...@moderne.io>
---
 pom.xml                                                        |  2 +-
 .../maven/plugins/resources/stub/MavenProjectBuildStub.java    | 10 ++++++----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/pom.xml b/pom.xml
index 1a168ca..c8720a6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -137,7 +137,7 @@ under the License.
     <dependency>
       <groupId>commons-io</groupId>
       <artifactId>commons-io</artifactId>
-      <version>2.20.0</version>
+      <version>2.21.0</version>
       <scope>test</scope>
     </dependency>
     <dependency>
diff --git a/src/test/java/org/apache/maven/plugins/resources/stub/MavenProjectBuildStub.java b/src/test/java/org/apache/maven/plugins/resources/stub/MavenProjectBuildStub.java
index 490fcc9..0d01e11 100644
--- a/src/test/java/org/apache/maven/plugins/resources/stub/MavenProjectBuildStub.java
+++ b/src/test/java/org/apache/maven/plugins/resources/stub/MavenProjectBuildStub.java
@@ -27,6 +27,8 @@ import java.util.HashMap;
 import org.apache.maven.model.Build;
 import org.codehaus.plexus.util.FileUtils;
 
+import static org.apache.commons.io.FileUtils.deleteDirectory;
+
 public class MavenProjectBuildStub extends MavenProjectBasicStub {
     protected Build build;
 
@@ -145,19 +147,19 @@ public class MavenProjectBuildStub extends MavenProjectBasicStub {
 
     public void cleanBuildEnvironment() throws Exception {
         if (FileUtils.fileExists(resourcesDirectory)) {
-            FileUtils.deleteDirectory(resourcesDirectory);
+            deleteDirectory(new File(resourcesDirectory));
         }
 
         if (FileUtils.fileExists(testResourcesDirectory)) {
-            FileUtils.deleteDirectory(testResourcesDirectory);
+            deleteDirectory(new File(testResourcesDirectory));
         }
 
         if (FileUtils.fileExists(outputDirectory)) {
-            FileUtils.deleteDirectory(outputDirectory);
+            deleteDirectory(new File(outputDirectory));
         }
 
         if (FileUtils.fileExists(testOutputDirectory)) {
-            FileUtils.deleteDirectory(testOutputDirectory);
+            deleteDirectory(new File(testOutputDirectory));
         }
     }