conor 02/02/08 05:44:44
Modified:
proposal/mutant/src/java/antlibs/system/code/org/apache/ant/antlib/system
Ant.java AntBase.java AntCall.java
Log:
Fix up determination of basedir on Antcall
Revision Changes Path
1.4 +3 -1
jakarta-ant/proposal/mutant/src/java/antlibs/system/code/org/apache/ant/antlib/system/Ant.java
Index: Ant.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/system/code/org/apache/ant/antlib/system/Ant.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -u -r1.3 -r1.4
--- Ant.java 8 Feb 2002 13:04:46 -0000 1.3
+++ Ant.java 8 Feb 2002 13:44:43 -0000 1.4
@@ -55,6 +55,7 @@
import java.io.File;
import org.apache.ant.common.service.ExecService;
import org.apache.ant.common.util.ExecutionException;
+import org.apache.ant.common.service.MagicProperties;
/**
* The Ant task - used to execute a different build file
@@ -112,6 +113,7 @@
antFile = new File(baseDir, "build.xml");
}
}
+ setProperty(MagicProperties.BASEDIR, baseDir.getAbsolutePath());
ExecService execService
= (ExecService)getCoreService(ExecService.class);
1.4 +15 -3
jakarta-ant/proposal/mutant/src/java/antlibs/system/code/org/apache/ant/antlib/system/AntBase.java
Index: AntBase.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/system/code/org/apache/ant/antlib/system/AntBase.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -w -u -r1.3 -r1.4
--- AntBase.java 6 Feb 2002 10:15:04 -0000 1.3
+++ AntBase.java 8 Feb 2002 13:44:43 -0000 1.4
@@ -123,7 +123,8 @@
/**
* Validate this data type instance
*
- * @exception ExecutionException if either attribute has not been set
+ * @exception ExecutionException if either attribute has not been
+ * set
*/
public void validateComponent() throws ExecutionException {
if (name == null) {
@@ -188,7 +189,8 @@
/**
* Validate this data type instance
*
- * @exception ExecutionException if the refid attribute has not been
set
+ * @exception ExecutionException if the refid attribute has not been
+ * set
*/
public void validateComponent() throws ExecutionException {
if (refId == null) {
@@ -289,6 +291,16 @@
}
/**
+ * Set a property for the subbuild
+ *
+ * @param propertyName the property name
+ * @param propertyValue the value of the property
+ */
+ protected void setProperty(String propertyName, Object propertyValue) {
+ properties.put(propertyName, propertyValue);
+ }
+
+ /**
* Get the list of targets to be executed
*
* @return A List of string target names.
1.3 +3 -0
jakarta-ant/proposal/mutant/src/java/antlibs/system/code/org/apache/ant/antlib/system/AntCall.java
Index: AntCall.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/proposal/mutant/src/java/antlibs/system/code/org/apache/ant/antlib/system/AntCall.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -u -r1.2 -r1.3
--- AntCall.java 8 Feb 2002 13:04:46 -0000 1.2
+++ AntCall.java 8 Feb 2002 13:44:43 -0000 1.3
@@ -54,6 +54,7 @@
package org.apache.ant.antlib.system;
import org.apache.ant.common.service.ExecService;
import org.apache.ant.common.util.ExecutionException;
+import org.apache.ant.common.service.MagicProperties;
/**
* The Ant task - used to execute a different build file
@@ -68,6 +69,8 @@
* @exception ExecutionException if the build fails
*/
public void execute() throws ExecutionException {
+ setProperty(MagicProperties.BASEDIR,
+ getContext().getBaseDir().getAbsolutePath());
ExecService execService
= (ExecService)getCoreService(ExecService.class);
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>