continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r564506 - in /maven/continuum/trunk: continuum-core/pom.xml continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java pom.xml
Date Fri, 10 Aug 2007 08:26:31 GMT
Author: evenisse
Date: Fri Aug 10 01:26:30 2007
New Revision: 564506

URL: http://svn.apache.org/viewvc?view=rev&rev=564506
Log:
[CONTINUUM-971] Don't traverse symbolic links on deletion
Submitted by : Olivier Lamy

Modified:
    maven/continuum/trunk/continuum-core/pom.xml
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
    maven/continuum/trunk/pom.xml

Modified: maven/continuum/trunk/continuum-core/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/pom.xml?view=diff&rev=564506&r1=564505&r2=564506
==============================================================================
--- maven/continuum/trunk/continuum-core/pom.xml (original)
+++ maven/continuum/trunk/continuum-core/pom.xml Fri Aug 10 01:26:30 2007
@@ -37,6 +37,10 @@
       <artifactId>maven-model</artifactId>
     </dependency>
     <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>file-management</artifactId>
+    </dependency>    
+    <dependency>
       <groupId>org.apache.maven.scm</groupId>
       <artifactId>maven-scm-provider-svnexe</artifactId>
     </dependency>

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java?view=diff&rev=564506&r1=564505&r2=564506
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CleanWorkingDirectoryAction.java
Fri Aug 10 01:26:30 2007
@@ -22,6 +22,8 @@
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.store.ContinuumStore;
 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 org.codehaus.plexus.util.FileUtils;
 
 import java.io.File;
@@ -55,7 +57,13 @@
 
         if ( workingDirectory.exists() )
         {
-            FileUtils.cleanDirectory( 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 );
         }
     }
 }

Modified: maven/continuum/trunk/pom.xml
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/pom.xml?view=diff&rev=564506&r1=564505&r2=564506
==============================================================================
--- maven/continuum/trunk/pom.xml (original)
+++ maven/continuum/trunk/pom.xml Fri Aug 10 01:26:30 2007
@@ -429,6 +429,11 @@
         <version>1.0</version>
       </dependency>
       <dependency>
+        <groupId>org.apache.maven.shared</groupId>
+        <artifactId>file-management</artifactId>
+        <version>1.1</version>
+      </dependency>
+      <dependency>
         <groupId>jpox</groupId>
         <artifactId>jpox</artifactId>
         <version>1.1.7</version>



Mime
View raw message