Not sure if it helps you for your specific case but you might want to have a
look at the Gradle Tomcat plugin:
https://github.com/bmuschko/gradle-tomcat-plugin. In case you want to use
Tomcat as a development container this might be the way to go.

Ben


DarthMaul wrote:
> 
> I would like to start and stop Tomcat with Gradle tasks, but I figured I
> would start slowly and see if I could get things started first. Here is my
> task (executed on my Windows box):
> 
> tomcatHome = System.getenv()["CATALINA_HOME"]
> 
> task startTomcat() {
>   ant.java(jar: tomcatHome + "\\bin\\bootstrap.jar'", fork: "true") {
>     arg value: "start"
>     classpath {
>       pathelement path: tomcatHome + "\\lib"
>     }
>   }
> }
> 
> The result is this:
> 
> 19:51:38.234 [DEBUG]
> [org.gradle.api.internal.project.ant.AntLoggingAdapter]
> Execute:Java13CommandLauncher: Executing 'C:\Sun\SDK\jdk\jre\bin\java.exe'
> with arguments:
> '-classpath'
> 'C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib'
> '-jar'
> 'C:\Program Files\Apache Software Foundation\Tomcat
> 6.0\bin\bootstrap.jar''
> 'start'
> 
> The ' characters around the executable and arguments are
> not part of the command.
> 19:51:38.343 [INFO]
> [org.gradle.api.internal.project.ant.AntLoggingAdapter] [ant:java] Unable
> to access jarfile C:\Program Files\Apache Software Foundation\Tomcat
> 6.0\bin\bootstrap.jar'
> 
> Assume that file is there. Is there anything obviously wrong I am doing?
> 
> Incidentally, I tried adding escaped quotation marks to account for the
> spaces in the path, but that really made things weird.
> 
> Any insight would be appreciated.
> 
> Thanks.
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Starting-Tomcat-with-AntBuilder-tp31017723p31028885.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