buildscript { repositories { add(new org.apache.ivy.plugins.resolver.URLResolver()) { name = 'GitHub' addArtifactPattern 'http://cloud.github.com/downloads/[organisation]/[module]/[module]-[revision].[ext]' } } dependencies { classpath 'bmuschko:gradle-tomcat-plugin:0.9.2' } } apply plugin: 'war' apply plugin: 'tomcat' apply plugin: 'eclipse' sourceCompatibility = JavaVersion.VERSION_1_6 targetCompatibility = JavaVersion.VERSION_1_6 jerseyVersion = '1.12' springVersion = '3.1.1.RELEASE' springSecurityOauthVersion = '1.0.0.M6' springSecurityVersion = '3.1.0.RELEASE' hibernateValidatorVersion = '4.2.0.Final' repositories { mavenCentral() mavenLocal() maven { url "http://maven.springframework.org/milestone" } maven { url "http://maven.springframework.org/release" } maven { url "http://maven.springframework.org/snapshot" } maven { url "http://download.java.net/maven/2" } flatDir { dirs '../repos' } } configurations { providedCompile compile runtime all*.exclude group: 'commons-logging' // this is where we exclude } dependencies { def tomcatVersion = '7.0.27' 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' } providedCompile( [group: 'javax.servlet', name: 'servlet-api', version: '2.5'], ) compile( [group: 'javax.servlet', name: 'jstl', version: '1.2'], [group: 'org.springframework', name: 'spring-core', version: springVersion], [group: 'org.springframework', name: 'spring-aspects', version: springVersion], [group: 'org.springframework', name: 'spring-web', version: springVersion], [group: 'org.springframework', name: 'spring-webmvc', version: springVersion], [group: 'org.springframework.security', name: 'spring-security-core', version: springSecurityVersion], [group: 'org.springframework.security', name: 'spring-security-web', version: springSecurityVersion], [group: 'org.springframework.security', name: 'spring-security-config', version: springSecurityVersion], [group: 'org.springframework.security', name: 'spring-security-taglibs', version: springSecurityVersion], [group: 'org.aspectj', name: 'aspectjrt', version: '1.6.11.RELEASE'], [group: 'javax.validation', name: 'validation-api', version: '1.0.0.GA'], [group: 'org.hibernate', name: 'hibernate-validator', version: hibernateValidatorVersion], [group: 'javax.ws.rs', name: 'jsr311-api', version: '1.1.1'], [group: 'org.codehaus.jackson', name: 'jackson-mapper-asl', version: '1.9.4'], [group: 'joda-time', name: 'joda-time', version: '2.1'], [group: 'commons-lang', name: 'commons-lang', version: '2.4'], [group: 'commons-io', name: 'commons-io', version: '1.4'], [group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.1.3'], [group: 'org.slf4j', name: 'slf4j-api', version: '1.6.4'], [group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.6.4'], [group: 'ch.qos.logback', name: 'logback-core', version: '1.0.1'], [group: 'ch.qos.logback', name: 'logback-classic', version: '1.0.0'], [group: 'org.mifosng.data', name: 'mifosng-data', version: '0.2'], ) } [tomcatRun, tomcatRunWar, tomcatStop]*.with { configFile = file('src/test/resources/META-INF/context.xml') httpPort = 8085 httpsPort = 8444 stopPort = 8082 enableSSL = true; }