mirror of https://github.com/apache/maven.git
MNG-5734: Fail, rather than just warning, on empty '<module>' entries.
An incorrect non-blank module is currently treated as an error. Behave the same way for a blank module, rather than simply warning about the mistake. Signed-off-by: Jason van Zyl <jason@tesla.io>
This commit is contained in:
parent
fdcd34dd37
commit
b8dcb08731
|
@ -312,7 +312,7 @@ public class DefaultModelValidator
|
|||
String module = m.getModules().get( i );
|
||||
if ( StringUtils.isBlank( module ) )
|
||||
{
|
||||
addViolation( problems, Severity.WARNING, Version.BASE, "modules.module[" + i + "]", null,
|
||||
addViolation( problems, Severity.ERROR, Version.BASE, "modules.module[" + i + "]", null,
|
||||
"has been specified without a path to the project directory.",
|
||||
m.getLocation( "modules" ) );
|
||||
}
|
||||
|
|
|
@ -430,9 +430,9 @@ public class DefaultModelValidatorTest
|
|||
{
|
||||
SimpleProblemCollector result = validate( "empty-module.xml" );
|
||||
|
||||
assertViolations( result, 0, 0, 1 );
|
||||
assertViolations( result, 0, 1, 0 );
|
||||
|
||||
assertTrue( result.getWarnings().get( 0 ).contains( "'modules.module[0]' has been specified without a path" ) );
|
||||
assertTrue( result.getErrors().get( 0 ).contains( "'modules.module[0]' has been specified without a path" ) );
|
||||
}
|
||||
|
||||
public void testDuplicatePlugin()
|
||||
|
|
Loading…
Reference in New Issue