Jenkins and Ant - ant.bat not recognized but env vars are set well
Posted
by
Blue
on Stack Overflow
See other posts from Stack Overflow
or by Blue
Published on 2013-10-27T19:48:55Z
Indexed on
2013/10/28
15:54 UTC
Read the original article
Hit count: 3015
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\Administrator>java -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\Administrator>ant -version Apache Ant(TM) version 1.9.2 compiled on July 8 2013
C:\Users\Administrator>ant.bat Buildfile: build.xml does not exist! Build failed
I would appreciate our help.
Thank you, N
© Stack Overflow or respective owner