public void deleteArtifact( ManagedRepositoryContent repository, ArchivaArtifact artifact )
{
try
{
RepositoryContentIndex index = indexFactory.createFileContentIndex( repository.getRepository() );
FileContentRecord fileContentRecord = new FileContentRecord();
fileContentRecord.setRepositoryId( repository.getRepository().getId() );
fileContentRecord.setFilename( repository.toPath( artifact ) );
index.deleteRecord( fileContentRecord );
index = indexFactory.createHashcodeIndex( repository.getRepository() );
HashcodesRecord hashcodesRecord = new HashcodesRecord();
fileContentRecord.setRepositoryId( repository.getRepository().getId() );
hashcodesRecord.setArtifact( artifact );
index.deleteRecord( hashcodesRecord );
index = indexFactory.createBytecodeIndex( repository.getRepository() );
BytecodeRecord bytecodeRecord = new BytecodeRecord();
fileContentRecord.setRepositoryId( repository.getRepository().getId() );
bytecodeRecord.setArtifact( artifact );
index.deleteRecord( bytecodeRecord );
}
catch ( RepositoryIndexException e )
{