validateStringNotEmpty( prefix + "[" + repository.getId() + "].url", problems, Severity.ERROR,
repository.getUrl(), repository );
String key = repository.getId();
Repository existing = index.get( key );
if ( existing != null )
{
Severity errOn30 = getSeverity( request, ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0 );
addViolation( problems, errOn30, prefix + ".id", null, "must be unique: " + repository.getId() + " -> "
+ existing.getUrl() + " vs " + repository.getUrl(), repository );
}
else
{
index.put( key, repository );
}