0
votes

I have a java project and I'm gonna build it using a build agent running TFS 2015. I've installed JDK as well as ANT and also set the JAVA_HOME and ANT_HOME system variables. However the build process fails because of the following error message.

Unable to find Ant. Verify ANT_HOME is set and pointing to a valid Ant installation on the build agent: http://ant.apache.org/manual/install.html.

According to the instruction here, I should also install TFS build extensions, but I assume TFS 2015 does not require that and it comes with it by default.

I can figure out what the problem is.

1
sounds like ant executable is not on pathDBug
@DBug: it is, I mean I have also added the ANT_PATH/bin to the PATH variable. I can run ant command from the test agent and it runs.HHH
it is Windows Server 2012 R2.HHH
not familiar with tfs, but thought I'd suggest the obvious. SorryDBug
Is %ANT_HOME%\lib set in CLASSPATH system variable?Rao

1 Answers

0
votes

Ensure the user running the tfs build process has %ANT_HOME%\bin on it's %PATH% Setting ANT_HOME is necessary, but not sufficient.