mirror of https://github.com/apache/maven.git
PR: MNG-913
don't attempt to re-resolve a snapshot of the form 1.0-yyyyMMdd.HHmmss-B git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@292152 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bd839db47e
commit
b94672b9e4
|
@ -62,13 +62,13 @@ public abstract class AbstractVersionTransformation
|
|||
throws ArtifactMetadataRetrievalException
|
||||
{
|
||||
RepositoryMetadata metadata;
|
||||
if ( !artifact.isSnapshot() || Artifact.LATEST_VERSION.equals( artifact.getBaseVersion() ) )
|
||||
if ( artifact.isSnapshot() )
|
||||
{
|
||||
metadata = new ArtifactRepositoryMetadata( artifact );
|
||||
metadata = new SnapshotArtifactRepositoryMetadata( artifact );
|
||||
}
|
||||
else
|
||||
{
|
||||
metadata = new SnapshotArtifactRepositoryMetadata( artifact );
|
||||
metadata = new ArtifactRepositoryMetadata( artifact );
|
||||
}
|
||||
|
||||
repositoryMetadataManager.resolve( metadata, remoteRepositories, localRepository );
|
||||
|
|
|
@ -47,7 +47,8 @@ public class SnapshotTransformation
|
|||
public void transformForResolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository )
|
||||
throws ArtifactMetadataRetrievalException
|
||||
{
|
||||
if ( artifact.isSnapshot() )
|
||||
// Only select snapshots that are unresolved (eg 1.0-SNAPSHOT, not 1.0-20050607.123456)
|
||||
if ( artifact.isSnapshot() && artifact.getBaseVersion().equals( artifact.getVersion() ) )
|
||||
{
|
||||
String version = resolveVersion( artifact, localRepository, remoteRepositories );
|
||||
artifact.updateVersion( version, localRepository );
|
||||
|
|
Loading…
Reference in New Issue