donaldp 02/05/22 21:31:15
Modified: ant1compat/src/java/org/apache/tools/ant
Ant1CompatProject.java
antlib/src/java/org/apache/antlib/project
Resources.properties
container/src/java/org/apache/myrmidon/components/builder
DefaultProject.java
container/src/java/org/apache/myrmidon/components/workspace
Resources.properties
container/src/test/org/apache/myrmidon/components/embeddor/test
DefaultEmbeddorTest.java
framework/src/java/org/apache/myrmidon/framework
ExecuteTarget.java
Log:
Make TargetTask responsible for executing its own dependencies.
Revision Changes Path
1.6 +6 -6
jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatProject.java
Index: Ant1CompatProject.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/ant1compat/src/java/org/apache/tools/ant/Ant1CompatProject.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Ant1CompatProject.java 22 May 2002 07:36:21 -0000 1.5
+++ Ant1CompatProject.java 23 May 2002 04:31:14 -0000 1.6
@@ -35,7 +35,7 @@
* Ant1 original, this class contains the extensions.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Darrell DeBoer</a>
- * @version $Revision: 1.5 $ $Date: 2002/05/22 07:36:21 $
+ * @version $Revision: 1.6 $ $Date: 2002/05/23 04:31:14 $
*/
public class Ant1CompatProject
extends Project
@@ -157,7 +157,7 @@
* DataTypes to the underlying Ant1 Project, but calling add methods on
the
* superclass to avoid adding everything to the TypeManager.
*
- * @exception BuildException if the default task list cannot be loaded
+ * @throws BuildException if the default task list cannot be loaded
*/
public void init() throws BuildException
{
@@ -259,7 +259,7 @@
* @param taskClass The full name of the class implementing the task.
* Must not be <code>null</code>.
*
- * @exception BuildException if the class is unsuitable for being an Ant
+ * @throws BuildException if the class is unsuitable for being an Ant
* task. An error level message is logged
before
* this exception is thrown.
*
@@ -503,7 +503,7 @@
* by values, or <code>null</code> if the given string is
* <code>null</code>.
*
- * @exception BuildException if the given value has an unclosed
+ * @throws BuildException if the given value has an unclosed
* property name, e.g. <code>${xxx</code>
*/
public String replaceProperties( String value )
@@ -517,7 +517,7 @@
* Make the Ant1 project set the java version property, and then
* copy it into the context properties.
*
- * @exception BuildException if this Java version is not supported
+ * @throws BuildException if this Java version is not supported
*
* @see #getJavaVersion()
*/
@@ -539,7 +539,7 @@
* @param baseD The project base directory.
* Must not be <code>null</code>.
*
- * @exception BuildException if the directory if invalid
+ * @throws BuildException if the directory if invalid
*/
public void setBaseDir( File baseD ) throws BuildException
{
1.7 +1 -0
jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/Resources.properties
Index: Resources.properties
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/antlib/src/java/org/apache/antlib/project/Resources.properties,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Resources.properties 12 May 2002 11:18:38 -0000 1.6
+++ Resources.properties 23 May 2002 04:31:14 -0000 1.7
@@ -5,6 +5,7 @@
target.depends.notice=Dependencies for target "{0}": {1}
target.bad-dependency.error=Discovered empty dependency in target "{0}" at
{1}.
target.exec-depends.notice=Executing target "{0}"s dependencies: {1}
+target.missing-dependency.error=Dependency "{1}" of target "{0}" is missing.
param.noname.error=Missing name from parameter.
param.novalue.error=Missing value from parameter "{0}".
1.16 +4 -4
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProject.java
Index: DefaultProject.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/builder/DefaultProject.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DefaultProject.java 23 May 2002 01:50:25 -0000 1.15
+++ DefaultProject.java 23 May 2002 04:31:15 -0000 1.16
@@ -24,7 +24,7 @@
* Default project implementation.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
- * @version $Revision: 1.15 $ $Date: 2002/05/23 01:50:25 $
+ * @version $Revision: 1.16 $ $Date: 2002/05/23 04:31:15 $
*/
public class DefaultProject
implements Project, TargetMetaData
@@ -209,11 +209,11 @@
* @param target the target to execute
* @throws TaskException if an error occurs executing module
*/
- public void execute( ExecutionFrame frame,
- TargetMetaData target )
+ public void execute( final ExecutionFrame frame, final TargetMetaData
target )
throws TaskException
{
- m_workspace.executeProject( this, frame, target.getName() );
+ m_workspace.setFrame( frame );
+ m_workspace.executeProject( this, target.getName() );
}
public void setWorkspace( final Workspace workspace )
1.13 +1 -1
jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/Resources.properties
Index: Resources.properties
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/java/org/apache/myrmidon/components/workspace/Resources.properties,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- Resources.properties 21 May 2002 07:57:13 -0000 1.12
+++ Resources.properties 23 May 2002 04:31:15 -0000 1.13
@@ -6,7 +6,7 @@
exec-target.notice=Executing project {0}, target {1}.
exec-task.notice=Executing task {0}.
target-dependency-cycle.error=Cycle in dependencies for target {0}.
-workspace.nobuild-project.error=Unable to build project referenced by name
"{0}" and located at "{1}". (Reason: {2}).
+workspace.nobuild-project.error=Unable to build project located at "{0}".
(Reason: {1}).
#DefaultTaskContext
unknown-prop.error=Unknown property {0}.
1.16 +3 -2
jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java
Index: DefaultEmbeddorTest.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/container/src/test/org/apache/myrmidon/components/embeddor/test/DefaultEmbeddorTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- DefaultEmbeddorTest.java 23 May 2002 01:01:45 -0000 1.15
+++ DefaultEmbeddorTest.java 23 May 2002 04:31:15 -0000 1.16
@@ -25,7 +25,7 @@
* Test cases for the default embeddor.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Adam Murdoch</a>
- * @version $Revision: 1.15 $ $Date: 2002/05/23 01:01:45 $
+ * @version $Revision: 1.16 $ $Date: 2002/05/23 04:31:15 $
*/
public class DefaultEmbeddorTest
extends AbstractContainerTestCase
@@ -130,7 +130,8 @@
// Execute the default target
final String target = project.getDefaultTargetName();
- workspace.executeProject( project, frame, target );
+ workspace.setFrame( frame );
+ workspace.executeProject( project, target );
// Cleanup
listener.assertComplete();
1.6 +4 -6
jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/ExecuteTarget.java
Index: ExecuteTarget.java
===================================================================
RCS file:
/home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/ExecuteTarget.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ExecuteTarget.java 21 May 2002 05:57:14 -0000 1.5
+++ ExecuteTarget.java 23 May 2002 04:31:15 -0000 1.6
@@ -23,7 +23,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Donald</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Darrell DeBoer</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Adam Murdoch</a>
- * @version $Revision: 1.5 $ $Date: 2002/05/21 05:57:14 $
+ * @version $Revision: 1.6 $ $Date: 2002/05/23 04:31:15 $
*/
public class ExecuteTarget
{
@@ -98,10 +98,7 @@
}
// TODO - need to be able to inherit services (TypeManager
specifically)
-
- final Workspace workspace =
- embeddor.createWorkspace();
-
+ final Workspace workspace = embeddor.createWorkspace();
final ExecutionFrame frame =
embeddor.createExecutionFrame( buildParameters( context ) );
@@ -111,7 +108,8 @@
target = project.getDefaultTargetName();
}
- workspace.executeProject( project, frame, target );
+ workspace.setFrame( frame );
+ workspace.executeProject( project, target );
}
catch( final Exception e )
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>