ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: SubAnt output
Date Fri, 02 Jul 2004 12:40:57 GMT
-----Original Message-----
From: Stefan Bodewig

If so, a simple invocation of
getProject().registerThreadTask(Thread.currentThread(), ant) before
ant.execute() would have done the trick.  Hmm,
ant.setTaskName(getTaskName()) would solve the [ant] vs. [subant]

[DD] This is what I was trying to say earlier, except that if
[DD] itself was pushing (and popping if needed)
[DD] itself as the current threadTask in its execute() method
[DD] then would not need to do any of that.

[DD] At least in my original impl of, I was already
[DD] call ant.setTaskName(getTaskName()), so the name was not
[DD] really the issue (for me).

[DD] All I'm trying to say, and I think Jose Alberto as well, is
[DD] poor sobs like me who do not understand (or are even aware)
[DD] of Ant's I/O system should be able to reuse without
[DD] knowing the details, 'cause would do the right thing.

For some time we've been kicking around the idea of a utility class
for the delegation cases

        // uses project.createTask, transfers task name and target ...
        DelegatedTask ant = new DelegatedTask(this, "ant");
        // uses IntrospectionHelper, also supports nested elements in
        // some way
        ant.setAttribute("buildfile", buildFile);
        // registers itself as task responsible for output, calls
        // execute and deregisters itself at the end

[DD] This looks useful in its own right, especially for prototyping
[DD] purposes when writing a <script> or <scriptytypef>. But I believe
[DD] this is a bit different than the pb at hand. OK, it's not really
[DD] a pb as a patch is already in, it's just that I don't really like
[DD] what the patch means, i.e. that you need detailed and intimate
[DD] knowledge of to use it correctly. Any API should strive
[DD] to make difficult to write bad code, and ease writing good code,
[DD] and I just learned about contradicts this principle. --DD

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message