diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultTarget.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultTarget.java
deleted file mode 100644
index af7563848..000000000
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/DefaultTarget.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Copyright (C) The Apache Software Foundation. All rights reserved.
- *
- * This software is published under the terms of the Apache Software License
- * version 1.1, a copy of which has been included with this distribution in
- * the LICENSE file.
- */
-package org.apache.myrmidon.components.model;
-
-import java.util.ArrayList;
-import org.apache.avalon.framework.configuration.Configuration;
-
-/**
- * Default implementation of target.
- *
- * @author Peter Donald
- */
-public class DefaultTarget
- implements Target
-{
- private final ArrayList m_dependencies = new ArrayList();
- private final ArrayList m_tasks = new ArrayList();
- private final Condition m_condition;
-
- /**
- * Constructor taking condition for target.
- *
- * @param condition the condition
- */
- public DefaultTarget( final Condition condition )
- {
- m_condition = condition;
- }
-
- /**
- * Constructor for target with no condition.
- */
- public DefaultTarget()
- {
- this( null );
- }
-
- /**
- * Get condition under which target is executed.
- *
- * @return the condition for target or null
- */
- public Condition getCondition()
- {
- return m_condition;
- }
- /**
- * Get dependencies of target
- *
- * @return the dependency list
- */
- public String[] getDependencies()
- {
- return (String[])m_dependencies.toArray( new String[ 0 ] );
- }
-
- /**
- * Get tasks in target
- *
- * @return the target list
- */
- public Configuration[] getTasks()
- {
- return (Configuration[])m_tasks.toArray( new Configuration[ 0 ] );
- }
-
- /**
- * Add a dependency to target.
- *
- * @param dependency the dependency
- */
- public void addDependency( final String dependency )
- {
- m_dependencies.add( dependency );
- }
-
- /**
- * Add task to target.
- *
- * @param taskConfiguration the task representation
- */
- public void addTask( final Configuration taskData )
- {
- m_tasks.add( taskData );
- }
-}
diff --git a/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Target.java b/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Target.java
index 6681a4ff9..096392e8e 100644
--- a/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Target.java
+++ b/proposal/myrmidon/src/java/org/apache/myrmidon/components/model/Target.java
@@ -7,39 +7,71 @@
*/
package org.apache.myrmidon.components.model;
-import org.apache.avalon.framework.component.Component;
+import java.util.ArrayList;
import org.apache.avalon.framework.configuration.Configuration;
/**
- * Interface to represent targets in build file.
+ * Targets in build file.
*
* @author Peter Donald
*/
-public interface Target
- extends Component
+public class Target
{
- String ROLE = "org.apache.myrmidon.components.model.Target";
+ private final ArrayList m_dependencies = new ArrayList();
+ private final ArrayList m_tasks = new ArrayList();
+ private final Condition m_condition;
/**
- * Get dependencies of target
+ * Constructor taking condition for target.
*
- * @return the dependency list
+ * @param condition the condition
*/
- String[] getDependencies();
+ public Target( final Condition condition,
+ final Configuration[] tasks,
+ final String[] dependencies )
+ {
+ m_condition = condition;
+
+ for( int i = 0; i < tasks.length; i++ )
+ {
+ m_tasks.add( tasks[ i ] );
+ }
+
+ if( null != dependencies )
+ {
+ for( int i = 0; i < dependencies.length; i++ )
+ {
+ m_dependencies.add( dependencies[ i ] );
+ }
+ }
+ }
/**
- * Get tasks in target
+ * Get condition under which target is executed.
*
- * @return the target list
+ * @return the condition for target or null
*/
- Configuration[] getTasks();
+ public final Condition getCondition()
+ {
+ return m_condition;
+ }
+ /**
+ * Get dependencies of target
+ *
+ * @return the dependency list
+ */
+ public final String[] getDependencies()
+ {
+ return (String[])m_dependencies.toArray( new String[ 0 ] );
+ }
/**
- * Get condition under which target is executed.
+ * Get tasks in target
*
- * @return the condition for target or null
+ * @return the target list
*/
- Condition getCondition();
+ public final Configuration[] getTasks()
+ {
+ return (Configuration[])m_tasks.toArray( new Configuration[ 0 ] );
+ }
}
-
-