ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36256] - Project.executeTarget() doesn't update target task arguments on multiple calls from a Script Task
Date Fri, 19 Aug 2005 14:02:35 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36256>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36256





------- Additional Comments From andreok@mail.com  2005-08-19 16:02 -------
Hello Matt,

I replaced the Project.executeTarget() with the following function, and it 
works fine now:
"function executeTarget(targetName) {
    var targets = project.getTargets();
    var target = targets.get(targetName);
    var tasks = target.getTasks();
    for (j=0;j<tasks.length;j++) {
       var task = tasks[j];
       if (!task.getClass().toString().equals("class 
org.apache.tools.ant.UnknownElement")) {
          task.reconfigure();
       }
    }
    target.performTasks();
}"

It seems that the problem was related to a task configuration cache, and can be 
solved forcing a reconfiguration with the Task.reconfigure() method.

Thanks,
        Andre Kovacs

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message