Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 31294 invoked from network); 5 Jun 2002 17:05:30 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 5 Jun 2002 17:05:30 -0000 Received: (qmail 21066 invoked by uid 97); 5 Jun 2002 17:05:32 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@jakarta.apache.org Received: (qmail 20996 invoked by uid 97); 5 Jun 2002 17:05:31 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 20979 invoked by uid 97); 5 Jun 2002 17:05:30 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Date: 5 Jun 2002 17:05:22 -0000 Message-ID: <20020605170522.42055.qmail@icarus.apache.org> From: werken@apache.org To: jakarta-commons-sandbox-cvs@apache.org Subject: cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant TaskTag.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: