VersionedReference versionRef = new VersionedReference();
versionRef.setGroupId( artifact.getGroupId() );
versionRef.setArtifactId( artifact.getArtifactId() );
versionRef.setVersion( artifact.getVersion() );
ProjectReference projectRef = new ProjectReference();
projectRef.setGroupId( artifact.getGroupId() );
projectRef.setArtifactId( artifact.getArtifactId() );
try
{
metadataTools.updateMetadata( repository, versionRef );
}