stevel 02/04/07 23:34:10
Modified: src/main/org/apache/tools/ant/taskdefs CallTarget.java
Log:
adding inheritRefs to <antcall>, for better consistency with ant. The default
is of course false.
Revision Changes Path
1.17 +20 -1
jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java
Index: CallTarget.java
===================================================================
RCS file:
/home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/CallTarget.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- CallTarget.java 3 Mar 2002 01:46:20 -0000 1.16
+++ CallTarget.java 8 Apr 2002 06:34:10 -0000 1.17
@@ -87,6 +87,7 @@
private String subTarget;
private boolean initialized = false;
private boolean inheritAll = true;
+ private boolean inheritRefs = false;
/**
* If true, inherit all properties from parent Project
@@ -97,6 +98,18 @@
inheritAll = inherit;
} //-- setInheritAll
+ /**
+ * set the inherit refs flag
+ * @param inheritRefs new value
+ */
+ public void setInheritRefs(boolean inheritRefs) {
+ this.inheritRefs=inheritRefs;
+ }
+
+ /**
+ * init this task by creating new instance of the ant task and
+ * configuring it's by calling its own init method.
+ */
public void init() {
callee = (Ant) project.createTask("ant");
callee.setOwningTarget(target);
@@ -106,7 +119,12 @@
initialized = true;
}
- public void execute() {
+ /**
+ * hand off the work to the ant task of ours, after setting it up
+ * @throws BuildException on validation failure or if the target didn't
+ * execute
+ */
+ public void execute() throws BuildException {
if (!initialized) {
init();
}
@@ -120,6 +138,7 @@
callee.setAntfile(project.getProperty("ant.file"));
callee.setTarget(subTarget);
callee.setInheritAll(inheritAll);
+ callee.setInheritRefs(inheritRefs);
callee.execute();
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>