Browse Source

Stripping out unnecessary dependencies from sample jars.

pull/1/head
Luke Taylor 15 years ago
parent
commit
19e56f4397
  1. 16
      samples/cas/cas.gradle
  2. 5
      samples/contacts/contacts.gradle
  3. 10
      samples/jaas/jaas.gradle
  4. 10
      samples/ldap/ldap.gradle
  5. 10
      samples/preauth/preauth.gradle
  6. 6
      samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml
  7. 10
      samples/tutorial/tutorial.gradle

16
samples/cas/cas.gradle

@ -3,10 +3,20 @@ @@ -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 { @@ -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) { @@ -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
}
}

5
samples/contacts/contacts.gradle

@ -3,6 +3,11 @@ @@ -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'

10
samples/jaas/jaas.gradle

@ -3,6 +3,16 @@ @@ -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'

10
samples/ldap/ldap.gradle

@ -3,6 +3,16 @@ @@ -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'),

10
samples/preauth/preauth.gradle

@ -3,6 +3,16 @@ @@ -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'),

6
samples/tutorial/src/main/webapp/WEB-INF/applicationContext-security.xml

@ -13,11 +13,7 @@ @@ -13,11 +13,7 @@
<debug />
<global-method-security pre-post-annotations="enabled">
<!-- AspectJ pointcut expression that locates our "post" method and applies security that way
<protect-pointcut expression="execution(* bigbank.*Service.post*(..))" access="ROLE_TELLER"/>
-->
</global-method-security>
<global-method-security pre-post-annotations="enabled" />
<http pattern="/loggedout.jsp" security="none"/>

10
samples/tutorial/tutorial.gradle

@ -3,6 +3,16 @@ @@ -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'

Loading…
Cancel
Save