if (artifact.version.endsWith("-SNAPSHOT")) {
ArtifactRepositoryItem item = new ArtifactRepositoryItem(build, artifact, true);
add(item);
// add metadata for this artifact version
String key = artifact.groupId + ":" + artifact.artifactId + ":" + artifact.version;
MetadataRepositoryItem meta = metadata.get(key);
if (meta == null) {
metadata.put(key, meta = new MetadataRepositoryItem(build, artifact));
add(meta);
}
meta.addArtifact(artifact, item);
}
}