This post is based on the Gradle Cargo Plugin by bmuschko
Include the Plugin
You need to include the plugin in your build.gradle .
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-cargo-plugin:2.2.3'
}
}
apply plugin: 'com.bmuschko.cargo'
buildscript block should be the first thing in the build.gradle file.
Include the Gradle Cargo plugin dependencies
Add the following in your gradle dependencies block
dependencies {
def cargoVersion = '1.4.5'
cargo "org.codehaus.cargo:cargo-core-uberjar:$cargoVersion" ,
"org.codehaus.cargo:cargo-ant:$cargoVersion"
}
Define the Tomcat Container
To deploy The war files to Tomcat you need to create a dsl by name cargo and define the mandatory containerId .
Note ContainerId will define the version of tomcat you...