use method that works on JDK 1.4

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@307377 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Leslie Porter 2005-10-09 07:06:47 +00:00
parent c40ed7af8d
commit 279742edf8
1 changed files with 2 additions and 1 deletions

View File

@ -14,6 +14,7 @@ import java.util.List;
import java.util.Map;
import util.FileUtils;
import util.StringUtils;
public class ArtifactDownloader
{
@ -230,7 +231,7 @@ public class ArtifactDownloader
proxyUserName, proxyPassword, true );
if ( dep.getVersion().indexOf( "SNAPSHOT" ) >= 0 )
{
String name = destinationFile.getName().replace( version, dep.getVersion() );
String name = StringUtils.replace( destinationFile.getName(), version, dep.getVersion() );
FileUtils.copyFile( destinationFile, new File( destinationFile.getParentFile(), name ) );
}
}