ref.setGroupId( groupId );
ref.setArtifactId( artifactId );
ref.setVersion( version );
// delete from file system
repoContent.deleteVersion( ref );
MetadataRepository metadataRepository = repositorySession.getRepository();
Collection<ArtifactMetadata> artifacts =
metadataRepository.getArtifacts( repoId, groupId, artifactId, version );