Szczepan Faber wrote:
> 
> Oups, a correction to (2):
> 
> task stopTomcat(type:Exec) {
>   commandLine = ['cmd', '/c', 'stop.bat']
>   workingDir = file('../tomcat/bin')
> }
> 
Ok, this works, though it breaks completely if I try to run it when Tomcat
is already stopped, and I had to change it to the following:
                commandLine = ['cmd', '/c', 'net', 'stop', 'Apache Tomcat']

But ultimately what I would like to be able to do is write a single task
that does everything I mentioned above.  I've found this:

http://www.gradle.org/1.0-milestone-2/docs/userguide/custom_tasks.html

and I'm working on creating a custom Task that solves this for me.  However,
I'm not seeing anything in that document on how to make my new custom
DeployTomcatTask dependent on the "war" task's output file?  I'm going with
the buildSrc project option, and this is what I've got so far:

http://gradle.1045684.n5.nabble.com/file/n4311827/DeployTomcatTask.groovy
DeployTomcatTask.groovy 

Thanks :)

--
View this message in context: 
http://gradle.1045684.n5.nabble.com/Execute-command-line-task-tp4311284p4311827.html
Sent from the gradle-user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to