log.debug( "Not counting duplicate for artifact {} for path {}", dupArtifact, path );
continue;
}
RepositoryProblemFacet problem = new RepositoryProblemFacet();
problem.setRepositoryId( repoId );
problem.setNamespace( originalArtifact.getNamespace() );
problem.setProject( originalArtifact.getProject() );
problem.setVersion( originalArtifact.getVersion() );
problem.setId( id );
// FIXME: need to get the right storage resolver for the repository the dupe artifact is in, it might be
// a different type
// FIXME: we need the project version here, not the artifact version
problem.setMessage( "Duplicate Artifact Detected: " + path + " <--> " + pathTranslator.toPath(
dupArtifact.getNamespace(), dupArtifact.getProject(), dupArtifact.getVersion(),
dupArtifact.getId() ) );
problem.setProblem( "duplicate-artifact" );
try
{
metadataRepository.addMetadataFacet( repoId, problem );
}