Skip to content

Instantly share code, notes, and snippets.

@rscnt
Created August 13, 2013 16:25
Show Gist options
  • Save rscnt/6222921 to your computer and use it in GitHub Desktop.
Save rscnt/6222921 to your computer and use it in GitHub Desktop.
sec gradle build
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse'
apply plugin: 'eclipse-wtp'
apply plugin: 'tomcat'
apply plugin: 'idea'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:0.9.8'
}
}
repositories {
mavenCentral()
}
dependencies {
// librerias locales
compile fileTree(dir: 'libs', include: '*.jar')
compile 'javax.servlet:javax.servlet-api:3.0.1'
compile 'org.apache.httpcomponents:httpclient:4.1.1'
compile 'org.apache.httpcomponents:httpcore:4.1'
providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.0.1'
runtime 'javax.servlet:jstl:1.1.2'
def 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'
}
}
sourceSets {
main {
java {
srcDir 'src/main/webapp/WEB-INF/classes'
}
}
}
war.baseName = 'sec'
tomcatRunWar {
contextPath = "/"
reloadable = true
}
tomcatRun {
contextPath = "/"
reloadable = true
}
idea {
project {
jdkName = '1.7'
// projectLibraries << new ProjectLibrary(name: "my-library", classes: [new Path("path/to/library")])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment