mirror of https://github.com/apache/archiva.git
take of version when we delete a timestamped snapshot
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1352873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
bb1775cd72
commit
69ff5ca81c
|
@ -728,9 +728,23 @@ public class DefaultRepositoriesService
|
|||
|
||||
updateMetadata( metadata, metadataFile, lastUpdatedTimestamp, artifact );
|
||||
}
|
||||
Collection<ArtifactMetadata> artifacts =
|
||||
metadataRepository.getArtifacts( repositoryId, artifact.getGroupId(), artifact.getArtifactId(),
|
||||
artifact.getVersion() );
|
||||
Collection<ArtifactMetadata> artifacts = Collections.emptyList();
|
||||
|
||||
if ( snapshotVersion )
|
||||
{
|
||||
String baseVersion = VersionUtil.getBaseVersion( artifact.getVersion() );
|
||||
artifacts =
|
||||
metadataRepository.getArtifacts( repositoryId, artifact.getGroupId(), artifact.getArtifactId(),
|
||||
baseVersion );
|
||||
}
|
||||
else
|
||||
{
|
||||
artifacts =
|
||||
metadataRepository.getArtifacts( repositoryId, artifact.getGroupId(), artifact.getArtifactId(),
|
||||
artifact.getVersion() );
|
||||
}
|
||||
|
||||
log.debug( "artifacts: {}", artifacts );
|
||||
|
||||
for ( ArtifactMetadata artifactMetadata : artifacts )
|
||||
{
|
||||
|
@ -813,6 +827,7 @@ public class DefaultRepositoriesService
|
|||
}
|
||||
finally
|
||||
{
|
||||
|
||||
repositorySession.save();
|
||||
|
||||
repositorySession.close();
|
||||
|
|
Loading…
Reference in New Issue