When specifying a path to a build file under "Build File" (ie BuildFolder/build.xml), the Ant plugin will change the working directory to "BuildFolder" and run ant with the argument "-file build.xml". However when manually specifying -file BuilderFolder/build.xml under "Targets", the Ant plugin will STILL change the working directory, but this time not modify the -file path.
This causes Ant to fail.
I would expect that when leaving "Build File" blank, it would use the root directory of the Jenkins workspace.
The bug can be easily observed by replacing the ant binary with this simple shell script that prints the supplied arguments as well as the current working directory
I have attached screenshot of Jenkins configuration + output
This bug is observed on Jenkins 2.130 with Ant plugin version 1.8 (but it seems like this issue is not new, as it is also seen on Jenkins 1.595 with Ant plugin version 1.2