Re: "Invoke top-level Ant targets" doesn't seem to work for me
Folke Lemaitre wrote:
> I have a Hudson project where I would like to run an ant script located at
> WORKSPACE/src/build/code/build.ant, but I don't seem to get this to work.
> What I did:
> 1. added an existing ant installation to Hudson
> 2. configured the project for "Invoke top-level Ant targets"
> 3. selected the added ant installation
> 4. to the targets field I added: -f src/buil/code/build.ant
> I would expect the current directory for starting the ant script would be
> WORKSPACE, but this doesn't seem to be the case. See error:
> [src] $ cmd.exe /C e:\hudson\tools\apache-ant-1.7.0\bin\ant.bat -f
> src/build/code/build.ant && exit %%ERRORLEVEL%%
> Buildfile: src\build\code\build.ant does not exist!
> Build failed
That [src] at the left is the current directory. Because that's the top
of the checked out module, Hudson is using that to launch Ant.
So you need to change to "-f build/code/build.ant" since it's already in
> finished: FAILURE
> Is there any way I can refer to my buildscript without specifying an
> absolute path?
> Thanks in advance,
> Folke Lemaitre