{
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 );
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 )
{