<path to ant bin directory> ant -f <path to Java project>\build.xml build
echo "Ant build complete"
Without a log filter, the ANT builds return an error code of 1 and the step result is set to fail.
If the text string is found, use the Set Fail action to set the step result to fail. When you use a step log filter, if the text string is not found, the step result is always set to pass.
For details about setting log filters for steps, see Log filters.