mirror of https://github.com/apache/maven.git
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:
parent
30ef86e916
commit
96990da133
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue