]> source.dussan.org Git - archiva.git/commitdiff
Moving from Plexus Utils IOUtil to Commons IO IOUtils. close(..) becomes closeQuietly...
authorHenri Yandell <bayard@apache.org>
Sat, 2 Dec 2006 00:37:00 +0000 (00:37 +0000)
committerHenri Yandell <bayard@apache.org>
Sat, 2 Dec 2006 00:37:00 +0000 (00:37 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@481460 13f79535-47bb-0310-9956-ffa450edef68

14 files changed:
archiva-configuration/pom.xml
archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java
archiva-converter/pom.xml
archiva-converter/src/main/java/org/apache/maven/archiva/converter/DefaultRepositoryConverter.java
archiva-proxy/pom.xml
archiva-proxy/src/main/java/org/apache/maven/archiva/proxy/DefaultProxyRequestHandler.java
archiva-reports-standard/pom.xml
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/processor/InvalidPomArtifactReportProcessor.java
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/processor/LocationArtifactReportProcessor.java
archiva-reports-standard/src/main/java/org/apache/maven/archiva/reporting/store/DefaultReportingStore.java
archiva-reports-standard/src/test/java/org/apache/maven/archiva/reporting/reporter/AbstractChecksumArtifactReporterTestCase.java
archiva-sandbox/archiva-repository-assembler/pom.xml
archiva-sandbox/archiva-repository-assembler/src/main/java/org/apache/maven/archiva/repository/assembly/DefaultRepositoryAssembler.java
pom.xml

index efa11bdffdef2e034f6c6cda7564e373d423789f..d64883dc0267770e9dde6533b0741388aecde5a9 100644 (file)
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
     </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index c185a4626c052355454853634bdeacdf810880d6..22513a86db38aeace1d23eaf8ee1d9970808aa6f 100644 (file)
@@ -19,7 +19,7 @@ package org.apache.maven.archiva.configuration;
 import org.apache.maven.archiva.configuration.io.xpp3.ConfigurationXpp3Reader;
 import org.apache.maven.archiva.configuration.io.xpp3.ConfigurationXpp3Writer;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
@@ -112,7 +112,7 @@ public class DefaultConfigurationStore
             }
             finally
             {
-                IOUtil.close( fileReader );
+                IOUtils.closeQuietly( fileReader );
             }
         }
         return configuration;
@@ -166,7 +166,7 @@ public class DefaultConfigurationStore
         }
         finally
         {
-            IOUtil.close( fileWriter );
+            IOUtils.closeQuietly( fileWriter );
         }
     }
 
index 842a2015cea6f8b8255d3e5699f313b1dfc85d94..bb3abd78b8aa7467c4a75268032f09d8cd291b1b 100644 (file)
@@ -47,5 +47,9 @@
       <artifactId>plexus-i18n</artifactId>
       <version>1.0-beta-6</version>
     </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
   </dependencies>
 </project>
index 6f46b330a376952a2b485233edfcdc722b11aa90..3ee6b54e1d9bfe6c2bd5c8051c3619402e7f5f7b 100644 (file)
@@ -42,7 +42,7 @@ import org.codehaus.plexus.digest.Digester;
 import org.codehaus.plexus.digest.DigesterException;
 import org.codehaus.plexus.i18n.I18N;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
@@ -213,7 +213,7 @@ public class DefaultRepositoryConverter
             }
             finally
             {
-                IOUtil.close( writer );
+                IOUtils.closeQuietly( writer );
             }
         }
     }
@@ -243,7 +243,7 @@ public class DefaultRepositoryConverter
         }
         finally
         {
-            IOUtil.close( fileReader );
+            IOUtils.closeQuietly( fileReader );
         }
         return metadata;
     }
@@ -515,7 +515,7 @@ public class DefaultRepositoryConverter
                 }
                 finally
                 {
-                    IOUtil.close( writer );
+                    IOUtils.closeQuietly( writer );
                 }
             }
         }
index 4f7f03f4bdd1a144d7282930c50edbab855af3b3..8301da78cefa3b959197d5fd228a806b3bc1e706 100644 (file)
@@ -53,5 +53,9 @@
       <version>1.2_Java1.3</version>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
   </dependencies>
 </project>
index e0242794eade1e95aebb5c8d0dda7dc6e7beaa52..8d7eff60b74b5de4ce74f56431bd382fc641988e 100644 (file)
@@ -42,7 +42,7 @@ import org.codehaus.plexus.digest.DigestUtils;
 import org.codehaus.plexus.digest.DigesterException;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
@@ -407,7 +407,7 @@ public class DefaultProxyRequestHandler
                 }
                 finally
                 {
-                    IOUtil.close( fileReader );
+                    IOUtils.closeQuietly( fileReader );
                 }
             }
 
@@ -440,7 +440,7 @@ public class DefaultProxyRequestHandler
             }
             finally
             {
-                IOUtil.close( fileReader );
+                IOUtils.closeQuietly( fileReader );
             }
 
             if ( changed )
@@ -457,7 +457,7 @@ public class DefaultProxyRequestHandler
                 }
                 finally
                 {
-                    IOUtil.close( fileWriter );
+                    IOUtils.closeQuietly( fileWriter );
                 }
             }
         }
index ba86342df5b46c122c919ca8cff268a48f3cd8e6..3f1743f0d6323e32343fc802a7f52e7b925cf80c 100755 (executable)
       <groupId>commons-lang</groupId>
       <artifactId>commons-lang</artifactId>
     </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
index 19107c20c80053da97eda04bd456357b0a99b73d..f5277c5c02afce7ec6179a31f976fdc89c726798 100644 (file)
@@ -22,7 +22,7 @@ import org.apache.maven.model.Model;
 import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.archiva.reporting.processor.ArtifactReportProcessor;
 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
@@ -87,7 +87,7 @@ public class InvalidPomArtifactReportProcessor
                 }
                 finally
                 {
-                    IOUtil.close( reader );
+                    IOUtils.closeQuietly( reader );
                 }
             }
         }
index c297e1c14e297ca8eea3120b2d780777e086ecf4..39a8d446bea235eabb71f97a0ba3c22fbbc8f0de 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.maven.model.io.xpp3.MavenXpp3Reader;
 import org.apache.maven.project.MavenProjectBuilder;
 import org.apache.maven.archiva.reporting.processor.ArtifactReportProcessor;
 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
@@ -238,7 +238,7 @@ public class LocationArtifactReportProcessor
         }
         finally
         {
-            IOUtil.close( isReader );
+            IOUtils.closeQuietly( isReader );
         }
         return model;
     }
index d1c1f55523a40076c814887494b240b87e35f933..5e353f134dfdd972cf1e6e4acae9e5aed0bb7097 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.maven.archiva.reporting.store.ReportingStoreException;
 import org.apache.maven.archiva.reporting.database.ReportingDatabase;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.util.xml.pull.XmlPullParserException;
 
 import java.io.File;
@@ -94,7 +94,7 @@ public class DefaultReportingStore
                 }
                 finally
                 {
-                    IOUtil.close( fileReader );
+                    IOUtils.closeQuietly( fileReader );
                 }
             }
 
@@ -136,7 +136,7 @@ public class DefaultReportingStore
         }
         finally
         {
-            IOUtil.close( fileWriter );
+            IOUtils.closeQuietly( fileWriter );
         }
     }
 }
index 4974d8b396c95d1afe68b534661552960060b513..a9dea30434387db84cf78ba5f756c5f61191d47a 100644 (file)
@@ -19,7 +19,7 @@ package org.apache.maven.archiva.reporting.reporter;
 import org.codehaus.plexus.digest.Digester;
 import org.codehaus.plexus.digest.DigesterException;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 import org.apache.maven.archiva.reporting.AbstractRepositoryReportsTestCase;
 
 import java.io.BufferedOutputStream;
@@ -136,7 +136,7 @@ public abstract class AbstractChecksumArtifactReporterTestCase
 
             BufferedReader in = new BufferedReader( new FileReader( filename1 ) );
             out.putNextEntry( new JarEntry( filename1 ) );
-            IOUtil.copy( in, out );
+            IOUtils.copy( in, out );
             in.close();
             out.close();
 
index be8c763cef114a25e5a47644a08e02a8c717c012..f505f7b99f1145cce4bae03cbf48af6bf683c292 100644 (file)
@@ -59,5 +59,9 @@
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-container-default</artifactId>
     </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
   </dependencies>
 </project>
index 38d3ac7b0d5aba7d4dd5a94d64f7a2f03dbd02b3..8ec5c85473bc66952e3051744528888345fb180f 100644 (file)
@@ -32,7 +32,7 @@ import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
 import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 import org.codehaus.plexus.logging.AbstractLogEnabled;
 import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.IOUtil;
+import org.apache.commons.io.IOUtils;
 
 import java.io.File;
 import java.io.FileWriter;
@@ -268,7 +268,7 @@ public class DefaultRepositoryAssembler
                 }
                 finally
                 {
-                    IOUtil.close( writer );
+                    IOUtils.closeQuietly( writer );
                 }
 
                 try
diff --git a/pom.xml b/pom.xml
index 6025dcb2649f4f34abafae789f0d11459ddf100e..a8b3b7d0752ef1e289e5296d847b77012e917d2f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
         <artifactId>commons-lang</artifactId>
         <version>2.2</version>
       </dependency>
+      <dependency>
+        <groupId>commons-io</groupId>
+        <artifactId>commons-io</artifactId>
+        <version>1.2</version>
+      </dependency>
     </dependencies>
   </dependencyManagement>
   <reporting>