You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2008/09/25 22:25:22 UTC
svn commit: r699075 -
/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java
Author: jdcasey
Date: Thu Sep 25 13:25:22 2008
New Revision: 699075
URL: http://svn.apache.org/viewvc?rev=699075&view=rev
Log:
[MASSEMBLY-165] Catch exceptions while deleting test dirs, report them, then ignore them and move on. This is to work around file-locking issues on windows.
Modified:
maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java
Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java?rev=699075&r1=699074&r2=699075&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestFileManager.java Thu Sep 25 13:25:22 2008
@@ -119,7 +119,6 @@
}
public void cleanUp()
- throws IOException
{
for ( Iterator it = filesToDelete.iterator(); it.hasNext(); )
{
@@ -127,7 +126,14 @@
if ( file.exists() )
{
- FileUtils.forceDelete( file );
+ try
+ {
+ FileUtils.forceDelete( file );
+ }
+ catch ( Exception e )
+ {
+ System.err.println( "Error while deleting test file/dir: " + file + "; ignoring." );
+ }
}
it.remove();