o Fixed error reporting

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@812719 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-09-08 22:59:11 +00:00
parent e4c0baae36
commit ad6b0e4e44
2 changed files with 9 additions and 2 deletions

View File

@ -518,6 +518,8 @@ public class DefaultModelBuilder
DefaultModelProblemCollector problems )
throws ModelBuildingException
{
problems.setSourceHint( childModel );
Parent parent = childModel.getParent();
String groupId = parent.getGroupId();
@ -648,11 +650,11 @@ public class DefaultModelBuilder
}
catch ( ModelBuildingException e )
{
problems.getProblems().addAll( e.getProblems() );
problems.addAll( e.getProblems() );
continue;
}
problems.getProblems().addAll( importResult.getProblems() );
problems.addAll( importResult.getProblems() );
Model importModel = importResult.getEffectiveModel();

View File

@ -96,6 +96,11 @@ class DefaultModelProblemCollector
problems.add( problem );
}
public void addAll( List<ModelProblem> problems )
{
problems.addAll( problems );
}
public void addFatalError( String message )
{
problems.add( new DefaultModelProblem( message, ModelProblem.Severity.FATAL, getSourceHint() ) );