o Improved validation message

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@830558 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-10-28 14:28:25 +00:00
parent 30ef86e916
commit 96990da133
1 changed files with 12 additions and 2 deletions

View File

@ -376,8 +376,18 @@ public class DefaultModelValidator
{
boolean warning = request.getValidationLevel() < ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_3_0;
addViolation( problems, warning, "'" + prefix + ".(groupId:artifactId:type:classifier)' must be unique: "
+ key + " -> " + existing.getVersion() + " vs " + dependency.getVersion() );
String msg;
if ( String.valueOf( existing.getVersion() ).equals( dependency.getVersion() ) )
{
msg = "duplicate declaration of " + dependency.getVersion();
}
else
{
msg = existing.getVersion() + " vs " + dependency.getVersion();
}
addViolation( problems, warning, "'" + prefix
+ ".(groupId:artifactId:type:classifier)' must be unique: " + key + " -> " + msg );
}
else
{