mirror of https://github.com/apache/maven.git
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:
parent
cb7d87a550
commit
c40ed7af8d
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue