Jenkins and Ant - ant.bat not recognized but env vars are set well
- by Blue
I'm trying to set Jenkins to work with Ant but I get the following error:
Started by user anonymous
Building in workspace C:.jenkins\workspace\CI Demo
Checking out a fresh workspace because there's no workspace at C:.jenkins\workspace\CI Demo
Cleaning local Directory .
Checking out https:///svn/CI_Demo/trunk at revision '2013-10-27T19:34:31.549 +0000'
At revision 6
[CI Demo] $ cmd.exe /C '"ant.bat jar && exit %%ERRORLEVEL%%"'
'ant.bat' is not recognized as an internal or external command,
operable program or batch file.
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE
however, JAVA_HOME, ANT_HOME and I added the following to "Path": %ANT_HOME%\bin;%JAVA_HOME%\bin
And as you can see the command is recognizable when executed in CMD:
C:\Users\Administratorjava -version
java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
C:\Users\Administratorant -version
Apache Ant(TM) version 1.9.2 compiled on July 8 2013
C:\Users\Administratorant.bat
Buildfile: build.xml does not exist!
Build failed
I would appreciate our help.
Thank you,
N