svn commit: r169041 [1/2] - in /maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven: model/v3_0_0/ model/v3_0_0/io/xpp3/ tools/repoclean/ tools/repoclean/artifact/handler/ tools/repoclean/artifact/layout/ tools/repoclean/artifact/metad

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r169041 [1/2] - in /maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven: model/v3_0_0/ model/v3_0_0/io/xpp3/ tools/repoclean/ tools/repoclean/artifact/handler/ tools/repoclean/artifact/layout/ tools/repoclean/artifact/metad

John Casey-2
Author: jdcasey
Date: Fri May  6 22:45:20 2005
New Revision: 169041

URL: http://svn.apache.org/viewcvs?rev=169041&view=rev
Log:
o Refactored RepositoryCleaner to use DiscoveryPhase and RewritePhase.
o Added the ability to read a pom and figure out whether it's a v4 pom (based on presence of modelVersion)
o Added a more accurate counter for artifacts that are actually rewritten successfully, rather than just the ones that enter the rewriting process.
o Probably need to add the phases still...

Modified:
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Branch.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Build.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Contributor.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Dependency.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Developer.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/FileSet.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/License.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/MailingList.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Organization.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/PackageGroup.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Repository.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Resource.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/SourceModification.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/UnitTest.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Version.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Reader.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Writer.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleanerConfiguration.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/DtdHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/EarHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/JarDistroHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/LegacyPluginHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/RarHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/SarHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/TgzDistroHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/TldHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/handler/ZipDistroHandler.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/layout/AlphaBridgingRepositoryLayout.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/artifact/metadata/ProjectMetadata.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestException.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerificationException.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/DigestVerifier.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/digest/Digestor.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/AbstractArtifactDiscoverer.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/ArtifactDiscoverer.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/DefaultArtifactDiscoverer.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/discover/LegacyArtifactDiscoverer.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/index/ArtifactIndexer.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/FileReporter.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/report/ReportWriteException.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/ArtifactPomRewriter.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V3PomRewriter.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V4PomRewriter.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RewriteTransaction.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/transaction/RollbackException.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomTranslationException.java
    maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/translate/PomV3ToV4Translator.java

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Branch.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Branch.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Branch.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Branch.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Branch.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Build.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Build.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Build.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Build.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Build.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Contributor.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Contributor.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Contributor.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Contributor.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Contributor.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Dependency.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Dependency.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Dependency.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Dependency.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Dependency.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Developer.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Developer.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Developer.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Developer.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Developer.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/FileSet.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/FileSet.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/FileSet.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/FileSet.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class FileSet.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/License.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/License.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/License.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/License.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class License.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/MailingList.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/MailingList.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/MailingList.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/MailingList.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class MailingList.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Organization.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Organization.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Organization.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Organization.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Organization.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/PackageGroup.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/PackageGroup.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/PackageGroup.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/PackageGroup.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class PackageGroup.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Repository.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Repository.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Repository.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Repository.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Repository.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Resource.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Resource.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Resource.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Resource.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Resource.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/SourceModification.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/SourceModification.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/SourceModification.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/SourceModification.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class SourceModification.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/UnitTest.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/UnitTest.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/UnitTest.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/UnitTest.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class UnitTest.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Version.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Version.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Version.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/Version.java Fri May  6 22:45:20 2005
@@ -8,7 +8,6 @@
 //- Imported classes and packages -/
 //---------------------------------/
 
-
 /**
  * Class Version.
  *

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Reader.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Reader.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Reader.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Reader.java Fri May  6 22:45:20 2005
@@ -72,7 +72,8 @@
      * @param tagName
      * @param parser
      */
-    private Branch parseBranch( String tagName, XmlPullParser parser ) throws Exception
+    private Branch parseBranch( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Branch branch = new Branch();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -98,7 +99,8 @@
      * @param tagName
      * @param parser
      */
-    private Build parseBuild( String tagName, XmlPullParser parser ) throws Exception
+    private Build parseBuild( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Build build = new Build();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -176,7 +178,8 @@
      * @param tagName
      * @param parser
      */
-    private Contributor parseContributor( String tagName, XmlPullParser parser ) throws Exception
+    private Contributor parseContributor( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Contributor contributor = new Contributor();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -234,7 +237,8 @@
      * @param tagName
      * @param parser
      */
-    private Dependency parseDependency( String tagName, XmlPullParser parser ) throws Exception
+    private Dependency parseDependency( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Dependency dependency = new Dependency();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -293,7 +297,8 @@
      * @param tagName
      * @param parser
      */
-    private Developer parseDeveloper( String tagName, XmlPullParser parser ) throws Exception
+    private Developer parseDeveloper( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Developer developer = new Developer();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -355,7 +360,8 @@
      * @param tagName
      * @param parser
      */
-    private FileSet parseFileSet( String tagName, XmlPullParser parser ) throws Exception
+    private FileSet parseFileSet( String tagName, XmlPullParser parser )
+        throws Exception
     {
         FileSet fileSet = new FileSet();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -413,7 +419,8 @@
      * @param tagName
      * @param parser
      */
-    private License parseLicense( String tagName, XmlPullParser parser ) throws Exception
+    private License parseLicense( String tagName, XmlPullParser parser )
+        throws Exception
     {
         License license = new License();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -451,7 +458,8 @@
      * @param tagName
      * @param parser
      */
-    private MailingList parseMailingList( String tagName, XmlPullParser parser ) throws Exception
+    private MailingList parseMailingList( String tagName, XmlPullParser parser )
+        throws Exception
     {
         MailingList mailingList = new MailingList();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -489,7 +497,8 @@
      * @param tagName
      * @param parser
      */
-    private Model parseModel( String tagName, XmlPullParser parser ) throws Exception
+    private Model parseModel( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Model model = new Model();
         int eventType = parser.getEventType();
@@ -753,7 +762,8 @@
      * @param tagName
      * @param parser
      */
-    private Organization parseOrganization( String tagName, XmlPullParser parser ) throws Exception
+    private Organization parseOrganization( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Organization organization = new Organization();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -787,7 +797,8 @@
      * @param tagName
      * @param parser
      */
-    private PackageGroup parsePackageGroup( String tagName, XmlPullParser parser ) throws Exception
+    private PackageGroup parsePackageGroup( String tagName, XmlPullParser parser )
+        throws Exception
     {
         PackageGroup packageGroup = new PackageGroup();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -817,7 +828,8 @@
      * @param tagName
      * @param parser
      */
-    private PatternSet parsePatternSet( String tagName, XmlPullParser parser ) throws Exception
+    private PatternSet parsePatternSet( String tagName, XmlPullParser parser )
+        throws Exception
     {
         PatternSet patternSet = new PatternSet();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -871,7 +883,8 @@
      * @param tagName
      * @param parser
      */
-    private Repository parseRepository( String tagName, XmlPullParser parser ) throws Exception
+    private Repository parseRepository( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Repository repository = new Repository();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -905,7 +918,8 @@
      * @param tagName
      * @param parser
      */
-    private Resource parseResource( String tagName, XmlPullParser parser ) throws Exception
+    private Resource parseResource( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Resource resource = new Resource();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -971,7 +985,8 @@
      * @param tagName
      * @param parser
      */
-    private SourceModification parseSourceModification( String tagName, XmlPullParser parser ) throws Exception
+    private SourceModification parseSourceModification( String tagName, XmlPullParser parser )
+        throws Exception
     {
         SourceModification sourceModification = new SourceModification();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -1037,7 +1052,8 @@
      * @param tagName
      * @param parser
      */
-    private UnitTest parseUnitTest( String tagName, XmlPullParser parser ) throws Exception
+    private UnitTest parseUnitTest( String tagName, XmlPullParser parser )
+        throws Exception
     {
         UnitTest unitTest = new UnitTest();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -1107,7 +1123,8 @@
      * @param tagName
      * @param parser
      */
-    private Version parseVersion( String tagName, XmlPullParser parser ) throws Exception
+    private Version parseVersion( String tagName, XmlPullParser parser )
+        throws Exception
     {
         Version version = new Version();
         while ( parser.nextTag() == XmlPullParser.START_TAG )
@@ -1140,7 +1157,8 @@
      *
      * @param reader
      */
-    public Model read( Reader reader ) throws Exception
+    public Model read( Reader reader )
+        throws Exception
     {
         XmlPullParser parser = new MXParser();
         parser.setInput( reader );

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Writer.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Writer.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Writer.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/model/v3_0_0/io/xpp3/MavenXpp3Writer.java Fri May  6 22:45:20 2005
@@ -63,7 +63,8 @@
      * @param writer
      * @param model
      */
-    public void write( Writer writer, Model model ) throws Exception
+    public void write( Writer writer, Model model )
+        throws Exception
     {
         serializer = new MXSerializer();
         serializer.setProperty( "http://xmlpull.org/v1/doc/properties.html#serializer-indentation", "  " );
@@ -79,7 +80,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeBranch( Branch branch, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeBranch( Branch branch, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( branch != null )
         {
@@ -99,7 +101,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeBuild( Build build, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeBuild( Build build, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( build != null )
         {
@@ -107,28 +110,28 @@
             if ( build.getNagEmailAddress() != null )
             {
                 serializer.startTag( NAMESPACE, "nagEmailAddress" ).text( build.getNagEmailAddress() )
-                          .endTag( NAMESPACE, "nagEmailAddress" );
+                    .endTag( NAMESPACE, "nagEmailAddress" );
             }
             if ( build.getSourceDirectory() != null )
             {
                 serializer.startTag( NAMESPACE, "sourceDirectory" ).text( build.getSourceDirectory() )
-                          .endTag( NAMESPACE, "sourceDirectory" );
+                    .endTag( NAMESPACE, "sourceDirectory" );
             }
             if ( build.getUnitTestSourceDirectory() != null )
             {
                 serializer.startTag( NAMESPACE, "unitTestSourceDirectory" ).text( build.getUnitTestSourceDirectory() )
-                          .endTag( NAMESPACE, "unitTestSourceDirectory" );
+                    .endTag( NAMESPACE, "unitTestSourceDirectory" );
             }
             if ( build.getAspectSourceDirectory() != null )
             {
                 serializer.startTag( NAMESPACE, "aspectSourceDirectory" ).text( build.getAspectSourceDirectory() )
-                          .endTag( NAMESPACE, "aspectSourceDirectory" );
+                    .endTag( NAMESPACE, "aspectSourceDirectory" );
             }
             if ( build.getIntegrationUnitTestSourceDirectory() != null )
             {
                 serializer.startTag( NAMESPACE, "integrationUnitTestSourceDirectory" )
-                          .text( build.getIntegrationUnitTestSourceDirectory() )
-                          .endTag( NAMESPACE, "integrationUnitTestSourceDirectory" );
+                    .text( build.getIntegrationUnitTestSourceDirectory() )
+                    .endTag( NAMESPACE, "integrationUnitTestSourceDirectory" );
             }
             if ( build.getSourceModifications() != null && build.getSourceModifications().size() > 0 )
             {
@@ -165,7 +168,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeContributor( Contributor contributor, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeContributor( Contributor contributor, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( contributor != null )
         {
@@ -185,7 +189,7 @@
             if ( contributor.getOrganization() != null )
             {
                 serializer.startTag( NAMESPACE, "organization" ).text( contributor.getOrganization() )
-                          .endTag( NAMESPACE, "organization" );
+                    .endTag( NAMESPACE, "organization" );
             }
             if ( contributor.getRoles() != null && contributor.getRoles().size() > 0 )
             {
@@ -213,7 +217,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeDependency( Dependency dependency, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeDependency( Dependency dependency, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( dependency != null )
         {
@@ -271,7 +276,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeDeveloper( Developer developer, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeDeveloper( Developer developer, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( developer != null )
         {
@@ -295,7 +301,7 @@
             if ( developer.getOrganization() != null )
             {
                 serializer.startTag( NAMESPACE, "organization" ).text( developer.getOrganization() )
-                          .endTag( NAMESPACE, "organization" );
+                    .endTag( NAMESPACE, "organization" );
             }
             if ( developer.getRoles() != null && developer.getRoles().size() > 0 )
             {
@@ -323,7 +329,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeFileSet( FileSet fileSet, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeFileSet( FileSet fileSet, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( fileSet != null )
         {
@@ -364,7 +371,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeLicense( License license, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeLicense( License license, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( license != null )
         {
@@ -380,7 +388,7 @@
             if ( license.getDistribution() != null )
             {
                 serializer.startTag( NAMESPACE, "distribution" ).text( license.getDistribution() )
-                          .endTag( NAMESPACE, "distribution" );
+                    .endTag( NAMESPACE, "distribution" );
             }
             if ( license.getComments() != null )
             {
@@ -398,7 +406,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeMailingList( MailingList mailingList, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeMailingList( MailingList mailingList, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( mailingList != null )
         {
@@ -415,7 +424,7 @@
             if ( mailingList.getUnsubscribe() != null )
             {
                 serializer.startTag( NAMESPACE, "unsubscribe" ).text( mailingList.getUnsubscribe() )
-                          .endTag( NAMESPACE, "unsubscribe" );
+                    .endTag( NAMESPACE, "unsubscribe" );
             }
             if ( mailingList.getArchive() != null )
             {
@@ -433,7 +442,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeModel( Model model, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeModel( Model model, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( model != null )
         {
@@ -467,12 +477,12 @@
             if ( model.getCurrentVersion() != null )
             {
                 serializer.startTag( NAMESPACE, "currentVersion" ).text( model.getCurrentVersion() )
-                          .endTag( NAMESPACE, "currentVersion" );
+                    .endTag( NAMESPACE, "currentVersion" );
             }
             if ( model.getShortDescription() != null )
             {
                 serializer.startTag( NAMESPACE, "shortDescription" ).text( model.getShortDescription() )
-                          .endTag( NAMESPACE, "shortDescription" );
+                    .endTag( NAMESPACE, "shortDescription" );
             }
             if ( model.getDescription() != null )
             {
@@ -490,17 +500,17 @@
             if ( model.getIssueTrackingUrl() != null )
             {
                 serializer.startTag( NAMESPACE, "issueTrackingUrl" ).text( model.getIssueTrackingUrl() )
-                          .endTag( NAMESPACE, "issueTrackingUrl" );
+                    .endTag( NAMESPACE, "issueTrackingUrl" );
             }
             if ( model.getInceptionYear() != null )
             {
                 serializer.startTag( NAMESPACE, "inceptionYear" ).text( model.getInceptionYear() )
-                          .endTag( NAMESPACE, "inceptionYear" );
+                    .endTag( NAMESPACE, "inceptionYear" );
             }
             if ( model.getGumpRepositoryId() != null )
             {
                 serializer.startTag( NAMESPACE, "gumpRepositoryId" ).text( model.getGumpRepositoryId() )
-                          .endTag( NAMESPACE, "gumpRepositoryId" );
+                    .endTag( NAMESPACE, "gumpRepositoryId" );
             }
             if ( model.getSiteAddress() != null )
             {
@@ -510,17 +520,17 @@
             if ( model.getSiteDirectory() != null )
             {
                 serializer.startTag( NAMESPACE, "siteDirectory" ).text( model.getSiteDirectory() )
-                          .endTag( NAMESPACE, "siteDirectory" );
+                    .endTag( NAMESPACE, "siteDirectory" );
             }
             if ( model.getDistributionSite() != null )
             {
                 serializer.startTag( NAMESPACE, "distributionSite" ).text( model.getDistributionSite() )
-                          .endTag( NAMESPACE, "distributionSite" );
+                    .endTag( NAMESPACE, "distributionSite" );
             }
             if ( model.getDistributionDirectory() != null )
             {
                 serializer.startTag( NAMESPACE, "distributionDirectory" ).text( model.getDistributionDirectory() )
-                          .endTag( NAMESPACE, "distributionDirectory" );
+                    .endTag( NAMESPACE, "distributionDirectory" );
             }
             if ( model.getMailingLists() != null && model.getMailingLists().size() > 0 )
             {
@@ -638,7 +648,7 @@
             if ( model.getPackageName() != null )
             {
                 serializer.startTag( NAMESPACE, "package" ).text( model.getPackageName() )
-                          .endTag( NAMESPACE, "package" );
+                    .endTag( NAMESPACE, "package" );
             }
             serializer.endTag( NAMESPACE, tagName );
         }
@@ -706,7 +716,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writePatternSet( PatternSet patternSet, String tagName, XmlSerializer serializer ) throws Exception
+    private void writePatternSet( PatternSet patternSet, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( patternSet != null )
         {
@@ -742,7 +753,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeRepository( Repository repository, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeRepository( Repository repository, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( repository != null )
         {
@@ -755,7 +767,7 @@
             if ( repository.getDeveloperConnection() != null )
             {
                 serializer.startTag( NAMESPACE, "developerConnection" ).text( repository.getDeveloperConnection() )
-                          .endTag( NAMESPACE, "developerConnection" );
+                    .endTag( NAMESPACE, "developerConnection" );
             }
             if ( repository.getUrl() != null )
             {
@@ -772,7 +784,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeResource( Resource resource, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeResource( Resource resource, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( resource != null )
         {
@@ -785,7 +798,7 @@
             if ( resource.isFiltering() != false )
             {
                 serializer.startTag( NAMESPACE, "filtering" ).text( String.valueOf( resource.isFiltering() ) )
-                          .endTag( NAMESPACE, "filtering" );
+                    .endTag( NAMESPACE, "filtering" );
             }
             if ( resource.getDirectory() != null )
             {
@@ -824,7 +837,8 @@
      * @param tagName
      */
     private void writeSourceModification( SourceModification sourceModification, String tagName,
-                                         XmlSerializer serializer ) throws Exception
+                                         XmlSerializer serializer )
+        throws Exception
     {
         if ( sourceModification != null )
         {
@@ -832,17 +846,17 @@
             if ( sourceModification.getClassName() != null )
             {
                 serializer.startTag( NAMESPACE, "className" ).text( sourceModification.getClassName() )
-                          .endTag( NAMESPACE, "className" );
+                    .endTag( NAMESPACE, "className" );
             }
             if ( sourceModification.getProperty() != null )
             {
                 serializer.startTag( NAMESPACE, "property" ).text( sourceModification.getProperty() )
-                          .endTag( NAMESPACE, "property" );
+                    .endTag( NAMESPACE, "property" );
             }
             if ( sourceModification.getDirectory() != null )
             {
                 serializer.startTag( NAMESPACE, "directory" ).text( sourceModification.getDirectory() )
-                          .endTag( NAMESPACE, "directory" );
+                    .endTag( NAMESPACE, "directory" );
             }
             if ( sourceModification.getIncludes() != null && sourceModification.getIncludes().size() > 0 )
             {
@@ -875,7 +889,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeUnitTest( UnitTest unitTest, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeUnitTest( UnitTest unitTest, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( unitTest != null )
         {
@@ -921,7 +936,8 @@
      * @param serializer
      * @param tagName
      */
-    private void writeVersion( Version version, String tagName, XmlSerializer serializer ) throws Exception
+    private void writeVersion( Version version, String tagName, XmlSerializer serializer )
+        throws Exception
     {
         if ( version != null )
         {

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/Main.java Fri May  6 22:45:20 2005
@@ -136,15 +136,14 @@
         RepositoryCleanerConfiguration config = new RepositoryCleanerConfiguration();
         config.setSourceRepositoryPath( props.getProperty( "sourceRepositoryPath" ) );
         config.setSourceRepositoryLayout( props.getProperty( "sourceRepositoryLayout", "legacy" ) );
-        config.setSourcePomVersion( props.getProperty( "sourcePomVersion", "v3" ) );
         config.setTargetRepositoryPath( props.getProperty( "targetRepositoryPath" ) );
         config.setTargetRepositoryLayout( props.getProperty( "targetRepositoryLayout", "default" ) );
         config.setReportsPath( props.getProperty( "reportsPath" ) );
         config.setBlacklistedPatterns( props.getProperty( "blacklistedPatterns" ) );
         config.setReportOnly( Boolean.valueOf( props.getProperty( "reportOnly" ) ).booleanValue() );
 
-        config.setMailErrorReport(
-            Boolean.valueOf( props.getProperty( "errorReport.mailOnError", "false" ) ).booleanValue() );
+        config.setMailErrorReport( Boolean.valueOf( props.getProperty( "errorReport.mailOnError", "false" ) )
+            .booleanValue() );
         config.setErrorReportFromAddress( props.getProperty( "errorReport.fromAddress" ) );
         config.setErrorReportFromName( props.getProperty( "errorReport.fromName" ) );
         config.setErrorReportSubject( props.getProperty( "errorReport.subject" ) );
@@ -157,25 +156,34 @@
 
     private static void printHelp()
     {
-        System.out.println( "repoclean: Repository Cleaner/Converter.\n\n" +
-                            "Usage: repoclean -h|-template|<configuration-properties-file>\n\n" +
-                            "---------------------------------------------------------------------------\n" +
-                            "  Use the '-template' option to see sample configuration file options.\n" + "\n" );
+        System.out.println( "repoclean: Repository Cleaner/Converter.\n\n"
+            + "Usage: repoclean -h|-template|<configuration-properties-file>\n\n"
+            + "---------------------------------------------------------------------------\n"
+            + "  Use the '-template' option to see sample configuration file options.\n" + "\n" );
     }
 
     private static void printTemplate()
     {
-        System.out.println( "# ---------------------------------------------------------------------------\n" +
-                            "# repoclean: Repository Cleaner/Converter.\n" + "# This configuration auto-generated on: " + new java.util.Date() + "\n" +
-                            "# ---------------------------------------------------------------------------\n\n" +
-                            "# [REQUIRED OPTIONS]\n" + "sourceRepositoryPath=/path/to/repository/root\n" + "targetRepositoryPath=/path/to/repository/root\n" + "reportsPath=/path/to/reports/directory\n" + "reportOnly=[true|false]\n" + "\n" + "errorReport.mailOnError=[true|false]\n" + "errorReport.fromAddress=[hidden email]\n" + "errorReport.fromName=Admin\n" + "errorReport.subject=[REPOCLEAN] Error!\n" + "errorReport.toAddress=[hidden email]\n" + "errorReport.toName=Developers List\n" + "\n" + "# [DEFAULT VALUE: legacy]\n" + "#sourceRepositoryLayout=[legacy|default]\n\n" + "# [DEFAULT VALUE: v3]\n" + "#sourcePomType=[v3|v4]\n\n" + "# [DEFAULT VALUE: default]\n" + "#targetRepositoryLayout=[legacy|default]\n" + "# [DEFAULT VALUE: localhost]\n" + "#errorReport.smtpHost=<hostname>\n" + "\n" );
+        System.out.println( "# ---------------------------------------------------------------------------\n"
+            + "# repoclean: Repository Cleaner/Converter.\n" + "# This configuration auto-generated on: "
+            + new java.util.Date() + "\n"
+            + "# ---------------------------------------------------------------------------\n\n"
+            + "# [REQUIRED OPTIONS]\n" + "sourceRepositoryPath=/path/to/repository/root\n"
+            + "targetRepositoryPath=/path/to/repository/root\n" + "reportsPath=/path/to/reports/directory\n"
+            + "reportOnly=[true|false]\n" + "\n" + "errorReport.mailOnError=[true|false]\n"
+            + "errorReport.fromAddress=[hidden email]\n" + "errorReport.fromName=Admin\n"
+            + "errorReport.subject=[REPOCLEAN] Error!\n" + "errorReport.toAddress=[hidden email]\n"
+            + "errorReport.toName=Developers List\n" + "\n" + "# [DEFAULT VALUE: legacy]\n"
+            + "#sourceRepositoryLayout=[legacy|default]\n\n" + "# [DEFAULT VALUE: v3]\n"
+            + "# [DEFAULT VALUE: default]\n" + "#targetRepositoryLayout=[legacy|default]\n"
+            + "# [DEFAULT VALUE: localhost]\n" + "#errorReport.smtpHost=<hostname>\n" + "\n" );
     }
 
     private static void printUsage()
     {
-        System.out.println( "Required input is missing.\n\n" + "Usage:\n" +
-                            "--------------------------------------------------\n\n" +
-                            "repoclean -h|-template|<configuration-properties-file>\n" );
+        System.out.println( "Required input is missing.\n\n" + "Usage:\n"
+            + "--------------------------------------------------\n\n"
+            + "repoclean -h|-template|<configuration-properties-file>\n" );
     }
 
 }

Modified: maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java?rev=169041&r1=169040&r2=169041&view=diff
==============================================================================
--- maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java (original)
+++ maven/components/trunk/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java Fri May  6 22:45:20 2005
@@ -15,21 +15,12 @@
  * the License. ====================================================================
  */
 
-import org.apache.maven.artifact.Artifact;
-import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
-import org.apache.maven.tools.repoclean.artifact.metadata.ProjectMetadata;
-import org.apache.maven.tools.repoclean.digest.DigestVerifier;
-import org.apache.maven.tools.repoclean.discover.ArtifactDiscoverer;
 import org.apache.maven.tools.repoclean.index.ArtifactIndexer;
+import org.apache.maven.tools.repoclean.phase.DiscoveryPhase;
+import org.apache.maven.tools.repoclean.phase.RewritePhase;
 import org.apache.maven.tools.repoclean.report.FileReporter;
-import org.apache.maven.tools.repoclean.report.PathLister;
-import org.apache.maven.tools.repoclean.report.ReportWriteException;
-import org.apache.maven.tools.repoclean.report.Reporter;
-import org.apache.maven.tools.repoclean.rewrite.ArtifactPomRewriter;
-import org.apache.maven.tools.repoclean.transaction.RewriteTransaction;
-import org.apache.maven.tools.repoclean.transaction.RollbackException;
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.context.Context;
@@ -40,39 +31,32 @@
 import org.codehaus.plexus.mailsender.MailSender;
 import org.codehaus.plexus.mailsender.MailSenderException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
-import org.codehaus.plexus.util.IOUtil;
 
-import java.io.BufferedInputStream;
-import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
 import java.text.SimpleDateFormat;
 import java.util.Date;
-import java.util.Iterator;
 import java.util.List;
 
 /**
  * @author jdcasey
  */
-public class RepositoryCleaner extends AbstractLogEnabled implements Contextualizable
+public class RepositoryCleaner
+    extends AbstractLogEnabled
+    implements Contextualizable
 {
 
     public static final String ROLE = RepositoryCleaner.class.getName();
 
     private static final String REPORTS_DIR_DATE_FORMAT = "dd-MMM-yyyy_hh.mm.ss";
 
-    private DigestVerifier digestVerifier;
-
-    private ArtifactRepositoryLayout bridgingLayout;
-
     private MailSender mailSender;
 
     private ArtifactIndexer artifactIndexer;
 
+    private DiscoveryPhase discoveryPhase;
+
+    private RewritePhase rewritePhase;
+
     private PlexusContainer container;
 
     private String dateSubdir;
@@ -97,90 +81,41 @@
             {
                 repoReporter = new FileReporter( reportsBase, "repository.report.txt" );
 
-                ArtifactDiscoverer artifactDiscoverer = null;
-
-                List artifacts = null;
-
-                PathLister kickoutLister = null;
-                PathLister excludeLister = null;
-
-                try
-                {
-                    artifactDiscoverer = (ArtifactDiscoverer) container.lookup( ArtifactDiscoverer.ROLE,
-                                                                                configuration.getSourceRepositoryLayout() );
-
-                    if ( logger.isDebugEnabled() )
-                    {
-                        logger.debug( "Discovering artifacts." );
-                    }
-
-                    try
-                    {
-                        File kickoutsList = new File( reportsBase, "kickouts.txt" );
-                        File excludesList = new File( reportsBase, "excludes.txt" );
+                List artifacts;
 
-                        kickoutLister = new PathLister( kickoutsList );
-                        excludeLister = new PathLister( excludesList );
+                artifacts = discoveryPhase.execute( reportsBase, sourceRepositoryBase, configuration, repoReporter );
 
-                        artifacts = artifactDiscoverer.discoverArtifacts( sourceRepositoryBase, repoReporter,
-                                                                          configuration.getBlacklistedPatterns(),
-                                                                          excludeLister, kickoutLister );
-                    }
-                    catch ( Exception e )
-                    {
-                        repoReporter.error( "Error discovering artifacts in source repository.", e );
-                        
-                        throw e;
-                    }
-
-                }
-                finally
-                {
-                    if ( artifactDiscoverer != null )
-                    {
-                        container.release( artifactDiscoverer );
-                    }
-
-                    if ( excludeLister != null )
-                    {
-                        excludeLister.close();
-                    }
-
-                    if ( kickoutLister != null )
-                    {
-                        kickoutLister.close();
-                    }
-                }
-
-                if ( artifacts != null )
+                if ( !artifacts.isEmpty() )
                 {
                     ArtifactRepositoryLayout sourceLayout = null;
                     ArtifactRepositoryLayout targetLayout = null;
                     try
                     {
                         sourceLayout = (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE,
-                                                                                    configuration.getSourceRepositoryLayout() );
+                                                                                    configuration
+                                                                                        .getSourceRepositoryLayout() );
 
-                        ArtifactRepository sourceRepo = new ArtifactRepository( "source", "file://" +
-                                                                                          sourceRepositoryBase.getAbsolutePath(),
-                                                                                sourceLayout );
+                        ArtifactRepository sourceRepo = new ArtifactRepository( "source", "file://"
+                            + sourceRepositoryBase.getAbsolutePath(), sourceLayout );
 
                         targetLayout = (ArtifactRepositoryLayout) container.lookup( ArtifactRepositoryLayout.ROLE,
-                                                                                    configuration.getTargetRepositoryLayout() );
+                                                                                    configuration
+                                                                                        .getTargetRepositoryLayout() );
 
-                        ArtifactRepository targetRepo = new ArtifactRepository( "target", "file://" +
-                                                                                          targetRepositoryBase.getAbsolutePath(),
-                                                                                targetLayout );
+                        ArtifactRepository targetRepo = new ArtifactRepository( "target", "file://"
+                            + targetRepositoryBase.getAbsolutePath(), targetLayout );
 
                         if ( logger.isDebugEnabled() )
                         {
                             logger.debug( "Rewriting POMs and artifact files." );
                         }
 
-                        artifactIndexer.writeAritfactIndex( artifacts, targetRepositoryBase );
+                        //                        List originalArtifacts = new ArrayList( artifacts );
+
+                        List rewritten = rewritePhase.execute( artifacts, sourceRepo, targetRepo, configuration,
+                                                               reportsBase, repoReporter );
 
-                        rewriteArtifactsAndPoms( artifacts, sourceRepo, targetRepo, configuration, reportsBase,
-                                                 sourceRepositoryBase, targetRepositoryBase, repoReporter );
+                        artifactIndexer.writeAritfactIndex( rewritten, targetRepositoryBase );
                     }
                     finally
                     {
@@ -203,8 +138,8 @@
 
                 if ( repoReporter.hasWarning() && logger.isDebugEnabled() )
                 {
-                    logger.debug(
-                        "Warning encountered while rewriting one or more artifacts from source repository to target repository." );
+                    logger
+                        .warn( "Warning encountered while rewriting one or more artifacts from source repository to target repository." );
                 }
             }
             finally
@@ -215,7 +150,8 @@
                 }
             }
 
-            // if we wrote a repository report, and the configuration says to email the report, then do it.
+            // if we wrote a repository report with an error in it, and the configuration says to email the report,
+            // then do it.
             if ( repoReporter.hasError() && configuration.mailErrorReport() )
             {
                 logger.debug( "Sending error report to " + configuration.getErrorReportToName() + " via email." );
@@ -224,10 +160,10 @@
 
                 StringBuffer contentBuffer = new StringBuffer();
 
-                contentBuffer.append( "Errors occurred while performing maven-1 to maven-2 repository conversion.\n\n" +
-                                      "For more details, see:\n\n" );
+                contentBuffer.append( "Errors occurred while performing maven-1 to maven-2 repository conversion.\n\n"
+                    + "For more details, see:\n\n" );
 
-                contentBuffer.append( configuration.getErrorReportLink().replaceAll("#date", dateSubdir) );
+                contentBuffer.append( configuration.getErrorReportLink().replaceAll( "#date", dateSubdir ) );
 
                 message.setContent( contentBuffer.toString() );
                 message.setSubject( configuration.getErrorReportSubject() );
@@ -242,292 +178,12 @@
                 catch ( MailSenderException e )
                 {
                     logger.error( "An error occurred while trying to email repoclean report.", e );
-                    
-                    throw e;
-                }
-            }
-        }
-
-    }
-
-    private void rewriteArtif