diff options
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java index d39d8c5d8..e51a360f0 100644 --- a/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java +++ b/archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java @@ -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 ) { |