continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r767793 - /continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
Date Thu, 23 Apr 2009 04:50:46 GMT
Author: evenisse
Date: Thu Apr 23 04:50:45 2009
New Revision: 767793

URL: http://svn.apache.org/viewvc?rev=767793&view=rev
Log:
[CONTINUUM-2119] Cleaning up large working directories fails with OutOfMemoryError
Submitted by: Frank Forstemann

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=767793&r1=767792&r2=767793&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
Thu Apr 23 04:50:45 2009
@@ -19,14 +19,13 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.Map;
+
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
-import org.apache.maven.shared.model.fileset.FileSet;
-import org.apache.maven.shared.model.fileset.util.FileSetManager;
-
-import java.io.File;
-import java.util.Map;
+import org.codehaus.plexus.util.FileUtils;
 
 /**
  * @author Jesse McConnell <jmcconnell@apache.org>
@@ -56,13 +55,7 @@
 
         if ( workingDirectory.exists() )
         {
-            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 );
+            FileUtils.deleteDirectory( workingDirectory );
         }
     }
 }



Mime
View raw message