Try and replicate a reported problem. import org.apache.tools.ant.BuildException; public class Foo extends org.apache.tools.ant.taskdefs.WaitFor { public void execute() { throw new BuildException("executing the Foo task"); } }