mirror of https://github.com/apache/archiva.git
correctly update metadata after deletion
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1351896 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
74077123a7
commit
c68f1c3154
|
@ -714,6 +714,15 @@ public class DefaultRepositoriesService
|
|||
{
|
||||
repository.deleteVersion( ref );
|
||||
}
|
||||
else
|
||||
{
|
||||
Set<ArtifactReference> related = repository.getRelatedArtifacts( artifactReference );
|
||||
log.debug( "related: {}", related );
|
||||
for ( ArtifactReference artifactRef : related )
|
||||
{
|
||||
repository.deleteArtifact( artifactRef );
|
||||
}
|
||||
}
|
||||
File metadataFile = getMetadata( targetPath.getAbsolutePath() );
|
||||
ArchivaRepositoryMetadata metadata = getMetadata( metadataFile );
|
||||
|
||||
|
@ -723,16 +732,6 @@ public class DefaultRepositoriesService
|
|||
metadataRepository.getArtifacts( repositoryId, artifact.getGroupId(), artifact.getArtifactId(),
|
||||
artifact.getVersion() );
|
||||
|
||||
if ( snapshotVersion )
|
||||
{
|
||||
Set<ArtifactReference> related = repository.getRelatedArtifacts( artifactReference );
|
||||
log.debug( "related: {}", related );
|
||||
for ( ArtifactReference artifactRef : related )
|
||||
{
|
||||
repository.deleteArtifact( artifactRef );
|
||||
}
|
||||
}
|
||||
|
||||
for ( ArtifactMetadata artifactMetadata : artifacts )
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue