Gradle Plugins

Maintained by aalmiray

Summary

The plugin provides deployment capabilities of web applications to an embedded Tomcat web container in any given Gradle build. It extends the War plugin. At the moment the Tomcat versions 6.x, 7.x and 8.x are supported.

Website https://github.com/bmuschko/gradle-tomcat-plugin
Author bmuschko
Version 1.0

Usage

buildscript {
    repositories { jcenter() }
    dependencies {
        classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:1.0'
    }
}

apply plugin: 'tomcat'

You must also define a specific tomcat version using the tomcat configuration, for example

repositories { jcenter() }
dependencies {
    String tomcatVersion = '7.0.11'
    tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
           "org.apache.tomcat.embed:tomcat-embed-logging-juli:${tomcatVersion}"
    tomcat("org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}") {
        exclude group: 'org.eclipse.jdt.core.compiler', module: 'ecj'
    }
}