werken 2002/06/05 10:05:22 Modified: jelly/src/java/org/apache/commons/jelly/tags/ant TaskTag.java Log: Modified TaskTag to call through ant's normal property-resolution code. Revision Changes Path 1.5 +20 -3 jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/TaskTag.java Index: TaskTag.java =================================================================== RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/TaskTag.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- TaskTag.java 2 Jun 2002 17:29:02 -0000 1.4 +++ TaskTag.java 5 Jun 2002 17:05:21 -0000 1.5 @@ -69,6 +69,7 @@ import org.apache.commons.jelly.XMLOutput; import org.apache.tools.ant.Task; +import org.apache.tools.ant.Project; /** * A tag which invokes an Ant Task @@ -92,18 +93,34 @@ // Tag interface //------------------------------------------------------------------------- public void doTag(XMLOutput output) throws Exception { + task.init(); - + // run the body first to configure the task via nested getBody().run(context, output); - - task.execute(); + + // task.execute(); + task.perform(); } // TaskSource interface //------------------------------------------------------------------------- public Object getTaskObject() { return task; + } + + + public void setAttribute(String name, + Object value) + { + // Catch the normal setAttribute, and call throw Ant's + // normal property-deref routines. + Project project = task.getProject(); + + String newValue = project.replaceProperties( (String) value ); + + super.setAttribute( name, + newValue ); } // Properties
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>