wagonManager.putArtifact( source, artifact, deploymentRepository );
// must be after the artifact is installed
for ( Iterator i = artifact.getMetadataList().iterator(); i.hasNext(); )
{
ArtifactMetadata metadata = (ArtifactMetadata) i.next();
repositoryMetadataManager.deploy( metadata, localRepository, deploymentRepository );
}
// TODO: would like to flush this, but the plugin metadata is added in advance, not as an install/deploy transformation
// This would avoid the need to merge and clear out the state during deployment
// artifact.getMetadataList().clear();