> From: David H Elrod [mailto:[EMAIL PROTECTED] > > A new person's thoughts: > > Maybe there could be an attribute 'exitStatusName="someName"' > for the task? When the task exits, then "someName" would be > set to the exit value. The user gets to pick the name and > set up the relationship between tasks (if any). The the > Project.getProperty("someName") call could return the > exist status of any arbitrary task. >
As Conor MacNeill pointed out, -> How will we decide the required structure of task results? The original -> request which prompted this thread was a desire to know if Javac did any -> work, not just whether it succeeded. So would a return result for Javac need -> to specify success/failure, did it do anything? How many files did it -> compile? Maybe even which files it compiled or even how long it took? I've already decided to approach it another way. However, if I was able to do anything within Ant, I would want not just an exit status. Minimally I would want to get at taskdefs.javac.compileList.size (). Even better I would want to get at the compileList attribute itself, so I could feed the list of "out of date" files to another process. So I don't think this is a general "exit status" type of opportunity. The desired feature is dependent on the Javac task, which is helpfully building the list of out of date files. Assuming a task following Javac's execution could get at the just-built compileList, it would first detect whether compileList.size() > 0. If so, it would then have to translate that Vector into a String[], and concatenate that array with the other arguments I need to pass to my compiler, finally exec'ing the compiler. (Then after the next release of Ant renames the "compileList" attribute to "sourceOutOfDateList", my builds break and I have to rewrite it again!) Or, I can just make my compiler a little better ;) -j
