continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r768870 - /continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
Date Mon, 27 Apr 2009 05:06:49 GMT
Author: evenisse
Date: Mon Apr 27 05:06:48 2009
New Revision: 768870

URL: http://svn.apache.org/viewvc?rev=768870&view=rev
Log:
revert change from rev 767793

Modified:
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java?rev=768870&r1=768869&r2=768870&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
Mon Apr 27 05:06:48 2009
@@ -25,7 +25,8 @@
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
-import org.codehaus.plexus.util.FileUtils;
+import org.apache.maven.shared.model.fileset.FileSet;
+import org.apache.maven.shared.model.fileset.util.FileSetManager;
 
 /**
  * @author Jesse McConnell <jmcconnell@apache.org>
@@ -55,7 +56,13 @@
 
         if ( workingDirectory.exists() )
         {
-            FileUtils.deleteDirectory( workingDirectory );
+            FileSetManager fileSetManager = new FileSetManager();
+            FileSet fileSet = new FileSet();
+            fileSet.setDirectory( workingDirectory.getPath() );
+            fileSet.addInclude( "**/**" );
+            // TODO : this with a configuration option somewhere ?
+            fileSet.setFollowSymlinks( false );
+            fileSetManager.delete( fileSet );
         }
     }
 }



Mime
View raw message