0

We have third party software that ships with a bundled ant installation and I would like to setup the build like this:

  • Copy the third party software into the workspace(including their bundled ant)(works)
  • checkout my source code(works)
  • invoke the bundled ant within the workspace using the ant plugin.(doesn't work).

I've tried:

  • ${WORKSPACE}\path-to-bundled-ant\apache-ant-1.8.2
  • %WORKSPACE%\path-to-bundled-ant\apache-ant-1.8.2
  • path-to-bundled-ant\apache-ant-1.8.2 (I'm on windows).

Has anyone succeeded in doing this type of setup?

1 Answers1

1

First, you can configure Jenkins to use any version of Ant that you want, without affecting the rest of the environment. You could have this particular job run with Ant 1.8.2 (installed by Jenkins), while other jobs run with different versions of Ant. This is the proper way.

You will not be able to use the "bundled in workspace Ant" through Jenkins Ant plugin. Refer to the first point.

If you want to manually (through Execute Windows Batch Command build step) execute the Ant command line, then use %WORKSPACE%\path-to-bundled-ant\apache-ant-1.8.2\bin\ant.bat. With that said, you would probably need to set the ANT_HOME variable, but for that particular job only.

I suggest you look into EnvInject plugin to set the ANT_HOME for this job only.

Community
  • 1
  • 1
Slav
  • 27,057
  • 11
  • 80
  • 104