o reactor failure mode is validated elsewhere

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@491534 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-01-01 05:11:48 +00:00
parent 439ba113d7
commit 98487def26
2 changed files with 4 additions and 23 deletions

View File

@ -235,14 +235,7 @@ public class DefaultMaven
try
{
rm = new ReactorManager( projects );
String requestFailureBehavior = request.getReactorFailureBehavior();
if ( requestFailureBehavior != null )
{
rm.setFailureBehavior( requestFailureBehavior );
}
rm = new ReactorManager( projects, request.getReactorFailureBehavior() );
}
catch ( CycleDetectedException e )
{

View File

@ -50,10 +50,12 @@ public class ReactorManager
private Map buildSuccessesByProject = new HashMap();
public ReactorManager( List projects )
public ReactorManager( List projects, String failureBehavior )
throws CycleDetectedException, DuplicateProjectException
{
this.sorter = new ProjectSorter( projects );
this.failureBehavior = failureBehavior;
}
public Map getPluginContext( PluginDescriptor plugin, MavenProject project )
@ -78,20 +80,6 @@ public class ReactorManager
return pluginContext;
}
public void setFailureBehavior( String failureBehavior )
{
if ( FAIL_FAST.equals( failureBehavior ) || FAIL_AT_END.equals( failureBehavior ) ||
FAIL_NEVER.equals( failureBehavior ) )
{
this.failureBehavior = failureBehavior;
}
else
{
throw new IllegalArgumentException( "Invalid failure behavior (must be one of: \'" + FAIL_FAST + "\', \'" +
FAIL_AT_END + "\', \'" + FAIL_NEVER + "\')." );
}
}
public String getFailureBehavior()
{
return failureBehavior;