* @param repository the repository where the metadata was encountered
* @param reporter the ReportingDatabase to receive processing results
*/
private void checkSnapshotMetadata( RepositoryMetadata metadata, ArtifactRepository repository )
{
RepositoryQueryLayer repositoryQueryLayer = repositoryQueryLayerFactory.createRepositoryQueryLayer( repository );
Versioning versioning = metadata.getMetadata().getVersioning();
if ( versioning != null )
{
Snapshot snapshot = versioning.getSnapshot();
String version = StringUtils.replace( metadata.getBaseVersion(), Artifact.SNAPSHOT_VERSION, snapshot
.getTimestamp()
+ "-" + snapshot.getBuildNumber() );
Artifact artifact = artifactFactory.createProjectArtifact( metadata.getGroupId(), metadata.getArtifactId(),
version );
artifact.isSnapshot(); // trigger baseVersion correction
if ( !repositoryQueryLayer.containsArtifact( artifact ) )
{
addFailure( metadata, "missing-snapshot-artifact-from-repository:" + version, "Snapshot artifact "
+ version + " does not exist." );
}
}