git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269084 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -7,20 +7,20 @@ | |||||
| */ | */ | ||||
| package org.apache.ant.modules.basic; | package org.apache.ant.modules.basic; | ||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.ant.tasklet.DataType; | import org.apache.ant.tasklet.DataType; | ||||
| import org.apache.ant.util.Condition; | |||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.myrmidon.components.model.Condition; | |||||
| /** | /** | ||||
| * Basic data type for holding patterns. | * Basic data type for holding patterns. | ||||
| * | |||||
| * | |||||
| * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | * @author <a href="mailto:donaldp@apache.org">Peter Donald</a> | ||||
| */ | */ | ||||
| public class Pattern | public class Pattern | ||||
| implements DataType | implements DataType | ||||
| { | { | ||||
| protected String m_name; | |||||
| protected Condition m_condition; | |||||
| private String m_name; | |||||
| private Condition m_condition; | |||||
| /** | /** | ||||
| * Retrieve name (aka value) of pattern. | * Retrieve name (aka value) of pattern. | ||||
| @@ -31,7 +31,7 @@ public class Pattern | |||||
| { | { | ||||
| return m_name; | return m_name; | ||||
| } | } | ||||
| /** | /** | ||||
| * Get condition associated with pattern if any. | * Get condition associated with pattern if any. | ||||
| * | * | ||||
| @@ -41,7 +41,7 @@ public class Pattern | |||||
| { | { | ||||
| return m_condition; | return m_condition; | ||||
| } | } | ||||
| /** | /** | ||||
| * Setter method for name/value of pattern. | * Setter method for name/value of pattern. | ||||
| * Conforms to ant setter patterns | * Conforms to ant setter patterns | ||||
| @@ -85,7 +85,7 @@ public class Pattern | |||||
| * | * | ||||
| * @exception TaskException if an error occurs | * @exception TaskException if an error occurs | ||||
| */ | */ | ||||
| protected void verifyConditionNull() | |||||
| private void verifyConditionNull() | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( null != m_condition ) | if( null != m_condition ) | ||||
| @@ -9,7 +9,6 @@ package org.apache.myrmidon.components.builder; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.io.IOException; | import java.io.IOException; | ||||
| import org.apache.ant.util.Condition; | |||||
| import org.apache.avalon.framework.ExceptionUtil; | import org.apache.avalon.framework.ExceptionUtil; | ||||
| import org.apache.avalon.framework.configuration.Configuration; | import org.apache.avalon.framework.configuration.Configuration; | ||||
| import org.apache.avalon.framework.configuration.ConfigurationException; | import org.apache.avalon.framework.configuration.ConfigurationException; | ||||
| @@ -17,6 +16,7 @@ import org.apache.avalon.framework.configuration.DefaultConfigurationBuilder; | |||||
| import org.apache.avalon.framework.logger.AbstractLoggable; | import org.apache.avalon.framework.logger.AbstractLoggable; | ||||
| import org.apache.log.Logger; | import org.apache.log.Logger; | ||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.components.model.Condition; | |||||
| import org.apache.myrmidon.components.model.DefaultProject; | import org.apache.myrmidon.components.model.DefaultProject; | ||||
| import org.apache.myrmidon.components.model.DefaultTarget; | import org.apache.myrmidon.components.model.DefaultTarget; | ||||
| import org.apache.myrmidon.components.model.Project; | import org.apache.myrmidon.components.model.Project; | ||||
| @@ -8,7 +8,6 @@ | |||||
| package org.apache.myrmidon.components.manager; | package org.apache.myrmidon.components.manager; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.ant.util.Condition; | |||||
| import org.apache.avalon.framework.activity.Disposable; | import org.apache.avalon.framework.activity.Disposable; | ||||
| import org.apache.avalon.framework.activity.Initializable; | import org.apache.avalon.framework.activity.Initializable; | ||||
| import org.apache.avalon.framework.component.ComponentException; | import org.apache.avalon.framework.component.ComponentException; | ||||
| @@ -23,6 +22,7 @@ import org.apache.myrmidon.api.DefaultTaskContext; | |||||
| import org.apache.myrmidon.api.TaskContext; | import org.apache.myrmidon.api.TaskContext; | ||||
| import org.apache.myrmidon.api.TaskException; | import org.apache.myrmidon.api.TaskException; | ||||
| import org.apache.myrmidon.components.executor.Executor; | import org.apache.myrmidon.components.executor.Executor; | ||||
| import org.apache.myrmidon.components.model.Condition; | |||||
| import org.apache.myrmidon.components.model.Project; | import org.apache.myrmidon.components.model.Project; | ||||
| import org.apache.myrmidon.components.model.Target; | import org.apache.myrmidon.components.model.Target; | ||||
| import org.apache.myrmidon.listeners.ProjectListener; | import org.apache.myrmidon.listeners.ProjectListener; | ||||
| @@ -5,14 +5,14 @@ | |||||
| * version 1.1, a copy of which has been included with this distribution in | * version 1.1, a copy of which has been included with this distribution in | ||||
| * the LICENSE file. | * the LICENSE file. | ||||
| */ | */ | ||||
| package org.apache.ant.util; | |||||
| package org.apache.myrmidon.components.model; | |||||
| import org.apache.myrmidon.api.TaskException; | |||||
| import org.apache.avalon.excalibur.property.PropertyException; | |||||
| import org.apache.avalon.excalibur.property.PropertyUtil; | |||||
| import org.apache.avalon.framework.component.Component; | import org.apache.avalon.framework.component.Component; | ||||
| import org.apache.avalon.framework.context.Context; | import org.apache.avalon.framework.context.Context; | ||||
| import org.apache.avalon.framework.context.ContextException; | import org.apache.avalon.framework.context.ContextException; | ||||
| import org.apache.avalon.excalibur.property.PropertyException; | |||||
| import org.apache.avalon.excalibur.property.PropertyUtil; | |||||
| import org.apache.myrmidon.api.TaskException; | |||||
| /** | /** | ||||
| * Class representing a condition. | * Class representing a condition. | ||||
| @@ -40,7 +40,7 @@ public class Condition | |||||
| { | { | ||||
| return m_isIfCondition; | return m_isIfCondition; | ||||
| } | } | ||||
| public boolean evaluate( final Context context ) | public boolean evaluate( final Context context ) | ||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| @@ -48,14 +48,14 @@ public class Condition | |||||
| try | try | ||||
| { | { | ||||
| final Object resolved = | |||||
| PropertyUtil.resolveProperty( getCondition(), context, false ); | |||||
| final Object resolved = | |||||
| PropertyUtil.resolveProperty( getCondition(), context, false ); | |||||
| if( null != resolved ) | |||||
| if( null != resolved ) | |||||
| { | { | ||||
| final Object object = context.get( resolved ); | final Object object = context.get( resolved ); | ||||
| //TODO: Do more than just check for presence???????????? | //TODO: Do more than just check for presence???????????? | ||||
| //true as object present | //true as object present | ||||
| result = true; | result = true; | ||||
| } | } | ||||
| @@ -8,7 +8,6 @@ | |||||
| package org.apache.myrmidon.components.model; | package org.apache.myrmidon.components.model; | ||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import org.apache.ant.util.Condition; | |||||
| import org.apache.avalon.framework.configuration.Configuration; | import org.apache.avalon.framework.configuration.Configuration; | ||||
| /** | /** | ||||
| @@ -7,7 +7,6 @@ | |||||
| */ | */ | ||||
| package org.apache.myrmidon.components.model; | package org.apache.myrmidon.components.model; | ||||
| import org.apache.ant.util.Condition; | |||||
| import org.apache.avalon.framework.component.Component; | import org.apache.avalon.framework.component.Component; | ||||
| import org.apache.avalon.framework.configuration.Configuration; | import org.apache.avalon.framework.configuration.Configuration; | ||||