mirror of https://github.com/apache/maven.git
Fixed '+' to '-' conversion for file paths so it will work with both poms and artifacts.
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@164120 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a02dd8e9d9
commit
35cc18bfbd
|
@ -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 );
|
||||
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue