tags:

views:

65

answers:

1

my build is a 3 step process. run ant to build. transfer war to server. touch reload file.

I have transfered last two steps in groovy, using antbuilder. However, I am not able to run my existing ant script using groovy.

Usually I run it using the following command in dos prompt:

ant -Dsystem=mysystem -DsomeotherOption=true

from groovy when I try to do

"ant -Dsystem=mysystem -DsomeotherOption=true".execute()

it gives an error saying ant is not a recognized command.

How can I utilize my existing ant script in groovy?

A: 

Try and give the absolute path to the ant executable, e.g. C:\path\to\ant

You could also use Ant programmatically as shown in this User Guide: http://groovy.codehaus.org/Using+Ant+from+Groovy

Sean A.O. Harney
great. that worked. had to give C:\path\to\ant.bat not having extension results in an error.
Omnipresent