diff --git a/samples/cas/cas.gradle b/samples/cas/cas.gradle
index c9848e8dcd..fb86dbef5d 100644
--- a/samples/cas/cas.gradle
+++ b/samples/cas/cas.gradle
@@ -3,10 +3,20 @@
apply plugin: 'war'
apply plugin: 'jetty'
+def excludeModules = ['spring-security-acl', 'jsr250-api', 'ehcache', 'spring-jdbc', 'spring-tx']
+
configurations {
casServer
}
+configurations {
+ excludeModules.each {name ->
+ runtime.exclude module: name
+ }
+
+ runtime.exclude group: 'org.aspectj'
+}
+
dependencies {
casServer "org.jasig.cas:cas-server-webapp:3.4.3.1@war"
@@ -20,7 +30,7 @@ dependencies {
def keystore = "$rootDir/samples/certificates/server.jks"
-jettyRun {
+[jettyRun, jettyRunWar]*.configure {
contextPath = "/cas"
def httpConnector = new org.mortbay.jetty.nio.SelectChannelConnector();
httpConnector.port = 8080
@@ -49,12 +59,12 @@ task casServer (type: org.gradle.api.plugins.jetty.JettyRunWar) {
}
}
-task cas (dependsOn: [jettyRun, casServer]) {
+task cas (dependsOn: [jettyRunWar, casServer]) {
}
gradle.taskGraph.whenReady {graph ->
if (graph.hasTask(cas)) {
- jettyRun.dependsOn(casServer)
+ jettyRunWar.dependsOn(casServer)
casServer.daemon = true
}
}
diff --git a/samples/contacts/contacts.gradle b/samples/contacts/contacts.gradle
index 7285bd3495..bd4b8974c8 100644
--- a/samples/contacts/contacts.gradle
+++ b/samples/contacts/contacts.gradle
@@ -3,6 +3,11 @@
apply plugin: 'war'
apply plugin: 'jetty'
+configurations {
+ runtime.exclude module: 'jsr250-api'
+ runtime.exclude group: 'org.aspectj'
+}
+
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5@jar'
diff --git a/samples/jaas/jaas.gradle b/samples/jaas/jaas.gradle
index c6a6031108..db238d098d 100644
--- a/samples/jaas/jaas.gradle
+++ b/samples/jaas/jaas.gradle
@@ -3,6 +3,16 @@
apply plugin: 'war'
apply plugin: 'jetty'
+def excludeModules = ['spring-security-acl', 'jsr250-api', 'ehcache', 'spring-jdbc', 'spring-tx']
+
+configurations {
+ excludeModules.each {name ->
+ runtime.exclude module: name
+ }
+
+ runtime.exclude group: 'org.aspectj'
+}
+
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5@jar'
diff --git a/samples/ldap/ldap.gradle b/samples/ldap/ldap.gradle
index 0c7e1790c2..befbeb78a7 100644
--- a/samples/ldap/ldap.gradle
+++ b/samples/ldap/ldap.gradle
@@ -3,6 +3,16 @@
apply plugin: 'war'
apply plugin: 'jetty'
+def excludeModules = ['spring-security-acl', 'jsr250-api', 'ehcache', 'spring-jdbc', 'ldapsdk']
+
+configurations {
+ excludeModules.each {name ->
+ runtime.exclude module: name
+ }
+
+ runtime.exclude group: 'org.aspectj'
+}
+
dependencies {
runtime project(':spring-security-web'),
diff --git a/samples/preauth/preauth.gradle b/samples/preauth/preauth.gradle
index 74a0dac96e..69d0821ce3 100644
--- a/samples/preauth/preauth.gradle
+++ b/samples/preauth/preauth.gradle
@@ -3,6 +3,16 @@
apply plugin: 'war'
apply plugin: 'jetty'
+def excludeModules = ['jsr250-api', 'ehcache', 'spring-jdbc', 'spring-tx']
+
+configurations {
+ excludeModules.each {name ->
+ runtime.exclude module: name
+ }
+
+ runtime.exclude group: 'org.aspectj'
+}
+
dependencies {
runtime project(':spring-security-web'),
diff --git a/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml b/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml
index 6ba6a38631..3c307b2071 100644
--- a/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml
+++ b/samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml
@@ -13,11 +13,7 @@
-
-
-
+
diff --git a/samples/tutorial/tutorial.gradle b/samples/tutorial/tutorial.gradle
index 745a22ed4d..23d83f35e3 100644
--- a/samples/tutorial/tutorial.gradle
+++ b/samples/tutorial/tutorial.gradle
@@ -3,6 +3,16 @@
apply plugin: 'war'
apply plugin: 'jetty'
+def excludeModules = ['spring-security-acl', 'jsr250-api', 'ehcache', 'spring-jdbc', 'spring-tx']
+
+configurations {
+ excludeModules.each {name ->
+ runtime.exclude module: name
+ }
+
+ runtime.exclude group: 'org.aspectj'
+}
+
dependencies {
providedCompile 'javax.servlet:servlet-api:2.5@jar'