Re: Custom task to force build success

2011-05-18 Thread Vimil Saju
I am not sure if its a good idea to do System.exit(0), as that will terminate the JVM. With ant it is possible to invoke nested builds using the subant task. In case of nested builds we may want one of the nested builds to succeed immediately and proceed with rest of tasks in the outer build.

Re: Custom task to force build success

2011-05-18 Thread Carlton Brown
Thanks for the help, guys... Shawn's approach gets me closest to where I want to be (just need to work on the condition nesting now). On Wed, May 18, 2011 at 11:29 AM, Shawn Castrianni < shawn.castria...@halliburton.com> wrote: > I didn't have to use a custom logger. Instead, my custom EndTask i

RE: Custom task to force build success

2011-05-18 Thread Shawn Castrianni
I didn't have to use a custom logger. Instead, my custom EndTask is this: package com.lgc.btlite; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; public class EndTask extends Task { protected String _message = null; public void execute() { if((_message != null)

Re: Custom task to force build success

2011-05-18 Thread Matt Benson
On Wed, May 18, 2011 at 10:07 AM, Carlton Brown wrote: > I'm struggling to write a custom task that is essentially the opposite of > "fail".   I've seen it mentioned on this list before, but never found a > conclusive answer. > > To be successful, a task expressed like this: > >   > > > The task

Custom task to force build success

2011-05-18 Thread Carlton Brown
I'm struggling to write a custom task that is essentially the opposite of "fail". I've seen it mentioned on this list before, but never found a conclusive answer. To be successful, a task expressed like this: The task would halt the build, and I would see the following output: You win! BUI