Skip to content

Instantly share code, notes, and snippets.

@yinheli
Created May 18, 2015 15:37
Show Gist options
  • Save yinheli/a018be0af903c78c1d52 to your computer and use it in GitHub Desktop.
Save yinheli/a018be0af903c78c1d52 to your computer and use it in GitHub Desktop.
servlet 3 web, with jetty
buildscript {
repositories {
jcenter()
}
dependencies {
// https://github.com/Khoulaiz/gradle-jetty-eclipse-plugin
classpath (group: 'com.sahlbach.gradle', name: 'gradle-jetty-eclipse-plugin', version: '1.9.+')
}
}
apply plugin: 'groovy'
apply plugin: 'java'
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'war'
apply plugin: 'jettyEclipse'
group = 'com.yinheli'
version = '1.0.0'
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
repositories {
flatDir {
dirs 'lib'
}
mavenLocal()
maven {url 'http://maven.oschina.net/content/groups/public/'}
mavenCentral()
maven {url 'http://jpos.org/maven'}
}
dependencies {
providedCompile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'commons-lang:commons-lang:2.6'
compile 'commons-pool:commons-pool:1.6'
compile 'org.slf4j:slf4j-nop:1.6.1'
compile 'org.quartz-scheduler:quartz:2.1.6'
compile 'com.alibaba:druid:0.2.9'
compile 'org.codehaus.groovy:groovy-all:2.3.11'
compile 'org.jpos:jpos:1.8.8'
compile 'org.jpos.ext:jpos_ext:1.2.0'
testCompile 'junit:junit:4.10'
}
task createDirs() {
sourceSets*.java.srcDirs*.each { it.mkdirs() }
sourceSets*.groovy.srcDirs*.each { it.mkdirs() }
sourceSets*.resources.srcDirs*.each { it.mkdirs() }
}
task libs(type: Sync) {
from configurations.runtime
into "$buildDir/libs"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment