Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Ant build- show ant path #3316

iamuser ·
Hello,
l have a question regarding Ant build.
Is there a way for me to print in Log the path of the Ant that is used in that build?

l need to switch between two different Ant versions depending on individual configs,
and l want to see if alternation is working okay.

Please let me know!
Thank you.
  • replies 5
  • views 4250
  • stars 0
robinshen ADMIN ·
If it is not configured explicitly via Ant plugin setting, QB will call ant (or ant.bat on Windows) and expect the command exists in your system path, so "which ant" will print out the ant to be used.
iamuser ·
What is the difference between setting Ant Executable Path in Ant Plugin setting and setting Working Directory in Build>Ant step?

l set groovy script in ' Ant Executable Path',
but it returns error saying it cannot find Ant program in the current working directory!

ERROR : Cannot run program "/usr/lib/ant/apache-ant-1.8.2/bin" (in directory "/home/sh/quickbuild/.../.../.../.../DEV"): error=13, Permission denied

And that is of course.
How do l set Ant Executable Path to find the path from root?
Laba42 ·
I have a similar question.
Can I access the plugin setting of "Ant Home" using Groovy script as vars.get ("Ant Home"), and if so how?

Georg
robinshen ADMIN ·
[quote="iamuser"]What is the difference between setting Ant Executable Path in Ant Plugin setting and setting Working Directory in Build>Ant step?

l set groovy script in ' Ant Executable Path',
but it returns error saying it cannot find Ant program in the current working directory!

ERROR : Cannot run program "/usr/lib/ant/apache-ant-1.8.2/bin" (in directory "/home/sh/quickbuild/package/quickbuild_new/workspace/root/SERVICE/SamsungAccountAPI_SSP-Account-idm-cn-DEV/DEV"): error=13, Permission denied

And that is of course.
How do l set Ant Executable Path to find the path from root?[/quote]

Ant executable path is the path telling QB where to find ant. It should be "/usr/lib/ant/apache-ant-1.8.2/bin/ant" (not simply the directory holding ant executable) in your case. The working directory is the directory where you are running ant.
robinshen ADMIN ·
[quote="Laba42"]I have a similar question.
Can I access the plugin setting of "Ant Home" using Groovy script as vars.get ("Ant Home"), and if so how?

Georg[/quote]
There is no built-in variable "Ant Home" telling you location of Ant. You may check what have been defined in Ant executable path in the plugin setting. If nothing has been defined there, then QB uses the Ant in your PATH environment.