diff --git a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java index 13c3946628..f1bcb3ca0e 100644 --- a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java +++ b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/RepositoryCleaner.java @@ -288,7 +288,7 @@ public class RepositoryCleaner boolean errorOccurred = false; File artifactSource = new File( sourceRepo.getBasedir(), sourceRepo.pathOf( artifact ) ); - File artifactTarget = new File( targetRepo.getBasedir(), targetRepo.pathOf( artifact ) ); + File artifactTarget = new File( targetRepo.getBasedir(), targetRepo.pathOf( artifact ).replace('+', '-') ); transaction.addFile( artifactTarget ); @@ -364,7 +364,7 @@ public class RepositoryCleaner File sourcePom = new File( sourceRepositoryBase, sourceRepo.pathOfMetadata( pom ) ); - File targetPom = new File( targetRepositoryBase, targetRepo.pathOfMetadata( pom ) ); + File targetPom = new File( targetRepositoryBase, targetRepo.pathOfMetadata( pom ).replace('+', '-') ); transaction.addFile( targetPom ); diff --git a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V3PomRewriter.java b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V3PomRewriter.java index d324f9100b..39ee3609be 100644 --- a/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V3PomRewriter.java +++ b/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/rewrite/V3PomRewriter.java @@ -41,13 +41,6 @@ public class V3PomRewriter public void rewrite( Artifact artifact, File from, File to, FileReporter reporter, boolean reportOnly ) throws Exception { - // should only have to handle this here...v4 repos shouldn't have this - // problem... - String toPath = to.getPath(); - toPath = toPath.replace( '+', '-' ); - - File target = new File( toPath ); - Model v4Model = null; if ( from.exists() ) @@ -104,7 +97,7 @@ public class V3PomRewriter FileWriter toWriter = null; try { - toWriter = new FileWriter( target ); + toWriter = new FileWriter( to ); MavenXpp3Writer v4Writer = new MavenXpp3Writer(); v4Writer.write( toWriter, v4Model ); }