apply plugin: 'java' apply plugin: 'war' /* apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin' gretty { port = 80 contextPath = '/' servletContainer = 'jetty9' } */ apply plugin: 'eclipse-wtp' apply plugin: 'jetty' jettyRun { httpPort = 80 } apply plugin: 'rebel' buildscript { repositories { mavenCentral() } dependencies { classpath group: 'org.zeroturnaround', name: 'gradle-jrebel-plugin', version: '1.1.2' } } ext.webAppClassesDir = "../ssts-web/src/main/webapp/WEB-INF/classes" war{ exclude 'WEB-INF/lib/*' } task cleanDir { doLast { FileTree tree = fileTree (dir: webAppLibDir); tree.each { File file -> delete(file) } delete webAppClassesDir } } task copyToWebappClasses << { copy { from './build/classes/main' into webAppClassesDir include '**/*.*' } copy { from './build/resources/main' into webAppClassesDir include '**/*.*' } } task copyDependenciesToLibDir(type: Copy) { from configurations.runtime into webAppLibDir exclude { details -> details.file.name.contains('servlet-api') || details.file.name.contains('jsp-api') } //println 'copyDependencies excuted!' } copyToWebappClasses.dependsOn cleanDir copyDependenciesToLibDir.dependsOn copyToWebappClasses // 1. Get dependencies from Maven local repository // 2. Get dependencies from Maven central repository repositories { ivy { // URL can refer to a local directory url "../localrepo/" } mavenLocal() mavenCentral() jcenter() } configurations { // other configurations e.g. - providedCompile.exclude module: 'commons-logging' all*.transitive = false } //Project dependencies dependencies { runtime 'org.apache.neethi:neethi:3.0.2' runtime 'jackson:jackson-all:1.9.11' runtime 'quartz:quartz:1.5.2' //runtime 'com.mchange:c3p0:0.9.2.1' runtime 'com.mchange:c3p0:0.9.5.2' runtime 'com.mchange:mchange-commons-java:0.2.11' runtime 'javax.transaction:jta:1.1' //runtime 'net.sourceforge.jtds:jtds:1.3.1' runtime 'com.microsoft.sqlserver:sqljdbc4:4.0' runtime 'dom4j:dom4j:1.6.1' runtime 'bsh:bsh:2.0b1' runtime 'activation:activation:1.1' runtime 'antlr:antlr:2.7.7' runtime 'net.sf.ezmorph:ezmorph:1.0.4' runtime 'wsdl4j:wsdl4j:1.6.2' runtime 'org.freemarker:freemarker:2.3.16' runtime 'ognl:ognl:3.0.6' runtime 'cglib:cglib:3.2.0' runtime 'cglib:cglib-nodep:3.2.0' runtime 'xom:xom:1.2.5' runtime 'xml:xmlschema-core:2.0.3' runtime 'org.springmodules:spring-modules-validation:0.8' runtime 'commons-attributes:commons-attributes-api:2.1' runtime 'commons-chain:commons-chain:1.1' runtime 'commons-cli:commons-cli:1.0' runtime 'commons-codec:commons-codec:1.3' runtime 'commons-discovery:commons-discovery:0.2' runtime 'commons-el:commons-el:1.0' runtime 'commons-httpclient:commons-httpclient:3.0' runtime 'commons-jxpath:commons-jxpath:1.2' runtime 'commons-validator:commons-validator:1.3.1' runtime 'xalan:xalan:2.5.1' runtime 'org.codehaus.groovy:groovy-all:1.7.5' runtime 'xml-resolver:xml-resolver:1.2' runtime 'xerces:xercesImpl:2.7.1' runtime 'xml-apis:xml-apis:1.0.b2' runtime 'xml:xmlsec:1.5.7' runtime 'org.apache.xmlbeans:xmlbeans:2.5.0' runtime 'org.opensaml:xmltooling:1.3.2' runtime 'woodstox:woodstox-core-asl:4.4.0' runtime 'woodstox:stax2-api:3.1.4' runtime 'org.apache.velocity:velocity:1.6.3' runtime 'org.apache.commons:commons-jci-core:1.1' runtime 'org.apache.commons:commons-jci-fam:1.1' runtime files ('../localrepo/libs/ojdbc6.jar') runtime group: 'fckeditor', name: 'FCKeditor', version:'2.3' } war.dependsOn copyDependenciesToLibDir