o Improved robustness against bad profile activation

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@823345 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Benjamin Bentmann 2009-10-08 22:15:18 +00:00
parent 38509d6a46
commit 9644d27e64
1 changed files with 10 additions and 2 deletions

View File

@ -93,12 +93,20 @@ public class DefaultProfileSelector
private boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems ) private boolean isActive( Profile profile, ProfileActivationContext context, ModelProblemCollector problems )
{ {
for ( ProfileActivator activator : activators ) for ( ProfileActivator activator : activators )
{
try
{ {
if ( activator.isActive( profile, context, problems ) ) if ( activator.isActive( profile, context, problems ) )
{ {
return true; return true;
} }
} }
catch ( RuntimeException e )
{
problems.addError( "Failed to determine activation for profile " + profile.getId(), e );
return false;
}
}
return false; return false;
} }