copy snapshot file

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

View File

@ -13,6 +13,8 @@ import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import util.FileUtils;
public class ArtifactDownloader public class ArtifactDownloader
{ {
public static final String SNAPSHOT_SIGNATURE = "-SNAPSHOT"; public static final String SNAPSHOT_SIGNATURE = "-SNAPSHOT";
@ -226,6 +228,11 @@ public class ArtifactDownloader
log( "Downloading " + url ); log( "Downloading " + url );
HttpUtils.getFile( url, destinationFile, ignoreErrors, useTimestamp, proxyHost, proxyPort, HttpUtils.getFile( url, destinationFile, ignoreErrors, useTimestamp, proxyHost, proxyPort,
proxyUserName, proxyPassword, true ); proxyUserName, proxyPassword, true );
if ( dep.getVersion().indexOf( "SNAPSHOT" ) >= 0 )
{
String name = destinationFile.getName().replace( version, dep.getVersion() );
FileUtils.copyFile( destinationFile, new File( destinationFile.getParentFile(), name ) );
}
} }
// Artifact was found, continue checking additional remote repos (if any) // Artifact was found, continue checking additional remote repos (if any)