continuum-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emmanuel Venisse <emmanuel.veni...@gmail.com>
Subject Re: 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 08:06:44 GMT
Good point, I'll check it in plexus-utils
Emmanuel

On Thu, Apr 23, 2009 at 6:54 AM, Brett Porter <brett@apache.org> wrote:

> Will this start following symlinks?
>
> There are some related issues, and if it does (which I think it might), it
> could be dangerous.
>
> - Brett
>
>
> On 23/04/2009, at 2:50 PM, evenisse@apache.org wrote:
>
>  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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message