mirror of
https://github.com/apache/maven.git
synced 2025-03-02 14:49:09 +00:00
PR: MNG-446
snapshot file should always be written on install of a snapshot git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@180217 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1218c92bd4
commit
3db9b6cd55
@ -63,22 +63,10 @@ public void transformForInstall( Artifact artifact, ArtifactRepository localRepo
|
||||
{
|
||||
artifact.setBaseVersion( m.group( 1 ) + "-" + SNAPSHOT_VERSION );
|
||||
}
|
||||
try
|
||||
else if ( isSnapshot( artifact ) )
|
||||
{
|
||||
VersionArtifactMetadata metadata = readFromLocalRepository( artifact, localRepository );
|
||||
if ( !metadata.exists() )
|
||||
{
|
||||
// doesn't exist - create to avoid an old snapshot download later
|
||||
metadata.storeInLocalRepository( localRepository );
|
||||
}
|
||||
}
|
||||
catch ( ArtifactPathFormatException e )
|
||||
{
|
||||
throw new ArtifactMetadataRetrievalException( "Error getting existing metadata", e );
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
throw new ArtifactMetadataRetrievalException( "Error getting existing metadata", e );
|
||||
SnapshotArtifactMetadata metadata = new SnapshotArtifactMetadata( artifact );
|
||||
metadata.storeInLocalRepository( localRepository );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user