1

I am trying to run embedded Tomcat with gradle, everything looks good, but when i am executing tomcatRunWar task this task running into console and nothing is going on.

buildscript {
repositories {
    jcenter()
}

dependencies {
    classpath 'com.bmuschko:gradle-tomcat-plugin:2.2.5'
}
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'com.bmuschko.tomcat'

sourceCompatibility = 1.8

repositories {
    mavenCentral()
}

dependencies {
def tomcatVersion = '7.0.59'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
        "org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}",
        "org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}

dependencies {Other dependencies}

Running all time and never ends

If deploy generated war into Tomcat manually It works great

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Ilya
  • 41
  • 8
  • 2
    The plugin deploys the WAR file but keeps the embedded Tomcat container running until you shut it down via CTRL + C. What exactly did you expect to happen? – Benjamin Muschko Sep 25 '16 at 15:51
  • OMG, really. It works, i just expected to see executed task and console. Can I see log information into embedded tomcat? – Ilya Sep 26 '16 at 07:55
  • The executed task is shown. Any logging from your application will be rendered to the console (it might be in a different tab in your IDE). I don't think the embedded Tomcat instance renders all other information you'd normally see in a standalone Tomcat instance. – Benjamin Muschko Sep 26 '16 at 12:00

0 Answers0