From f3264ba9ab24bbe97d986e773984b32b6287e635 Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Sun, 7 Mar 2010 21:58:25 +0000 Subject: [PATCH] Addition of commons-logging exclusions and adjustments to pom generation. --- acl/acl.gradle | 1 - cas/cas.gradle | 8 +++--- config/config.gradle | 6 ++--- core/core.gradle | 1 - gradle/javaprojects.gradle | 10 +++++--- gradle/maven.gradle | 31 +++++++++++++++++------ itest/web/itest-web.gradle | 6 ++--- ldap/ldap.gradle | 10 +++++--- openid/openid.gradle | 5 ++-- pom.xml | 5 ++++ samples/cas/cas.gradle | 3 --- samples/contacts/contacts.gradle | 2 +- samples/tutorial/tutorial.gradle | 2 +- sandbox/heavyduty/build.gradle | 42 ++++++++++++-------------------- sandbox/heavyduty/pom.xml | 32 ++++++++++++++++++++---- taglibs/taglibs.gradle | 1 - web/web.gradle | 1 - 17 files changed, 99 insertions(+), 67 deletions(-) diff --git a/acl/acl.gradle b/acl/acl.gradle index 869464d000..0aa25c3178 100644 --- a/acl/acl.gradle +++ b/acl/acl.gradle @@ -5,7 +5,6 @@ dependencies { "net.sf.ehcache:ehcache:$ehcacheVersion", "org.springframework:spring-aop:$springVersion", "org.springframework:spring-context:$springVersion", - "org.springframework:spring-core:$springVersion", "org.springframework:spring-tx:$springVersion", "org.springframework:spring-jdbc:$springVersion" diff --git a/cas/cas.gradle b/cas/cas.gradle index d692ae1905..7b4945de3e 100644 --- a/cas/cas.gradle +++ b/cas/cas.gradle @@ -2,12 +2,12 @@ dependencies { compile project(':spring-security-core'), project(':spring-security-web'), - "javax.servlet:servlet-api:2.5", - "org.springframework:spring-core:$springVersion", - "org.springframework:spring-context:$springVersion", + "org.springframework:spring-context:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-tx:$springVersion", - "org.springframework:spring-web:$springVersion", + "org.springframework:spring-web:$springVersion", "org.jasig.cas:cas-client-core:3.1.9", "net.sf.ehcache:ehcache:$ehcacheVersion" + + provided 'javax.servlet:servlet-api:2.5' } \ No newline at end of file diff --git a/config/config.gradle b/config/config.gradle index e595e52df4..a24a092a58 100644 --- a/config/config.gradle +++ b/config/config.gradle @@ -5,15 +5,15 @@ compileTestJava.dependsOn(':spring-security-core:compileTestJava') dependencies { compile project(':spring-security-core'), project(':spring-security-web'), - "javax.servlet:servlet-api:2.5", "org.aspectj:aspectjweaver:$aspectjVersion", "org.springframework:spring-aop:$springVersion", - "org.springframework:spring-core:$springVersion", "org.springframework:spring-context:$springVersion", - "org.springframework:spring-web:$springVersion", + "org.springframework:spring-web:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-tx:$springVersion" + provided "javax.servlet:servlet-api:2.5" + testCompile project(':spring-security-ldap'), project(':spring-security-openid'), files(this.project(':spring-security-core').sourceSets.test.classesDir), diff --git a/core/core.gradle b/core/core.gradle index fbb83e09f7..2e4ac049fa 100644 --- a/core/core.gradle +++ b/core/core.gradle @@ -5,7 +5,6 @@ dependencies { "net.sf.ehcache:ehcache:$ehcacheVersion", "org.springframework:spring-aop:$springVersion", "org.springframework:spring-beans:$springVersion", - "org.springframework:spring-core:$springVersion", "org.springframework:spring-context:$springVersion", "org.springframework:spring-expression:$springVersion", "org.springframework:spring-jdbc:$springVersion", diff --git a/gradle/javaprojects.gradle b/gradle/javaprojects.gradle index 1c69944ad9..d205a70ee8 100644 --- a/gradle/javaprojects.gradle +++ b/gradle/javaprojects.gradle @@ -21,6 +21,10 @@ configurations { dependencies { compile 'commons-logging:commons-logging:1.1.1' + compile ("org.springframework:spring-core:$springVersion") { + exclude(group: 'commons-logging', module: 'commons-logging') + } + testCompile 'junit:junit:4.7', 'org.mockito:mockito-core:1.7', 'org.jmock:jmock:2.5.1', @@ -28,9 +32,9 @@ dependencies { 'org.hamcrest:hamcrest-core:1.1', 'org.hamcrest:hamcrest-library:1.1', "org.springframework:spring-test:$springVersion" - bundlor 'com.springsource.bundlor:com.springsource.bundlor.ant:1.0.0.RC1', - 'com.springsource.bundlor:com.springsource.bundlor:1.0.0.RC1', - 'com.springsource.bundlor:com.springsource.bundlor.blint:1.0.0.RC1' + bundlor 'com.springsource.bundlor:com.springsource.bundlor.ant:1.0.0.RELEASE', + 'com.springsource.bundlor:com.springsource.bundlor:1.0.0.RELEASE', + 'com.springsource.bundlor:com.springsource.bundlor.blint:1.0.0.RELEASE' } test { diff --git a/gradle/maven.gradle b/gradle/maven.gradle index 188c2c53a6..bf88b8dc95 100644 --- a/gradle/maven.gradle +++ b/gradle/maven.gradle @@ -26,15 +26,11 @@ gradle.taskGraph.whenReady {graph -> } } +def deployer = null + uploadArchives { - def mavenDeployer = repositories.mavenDeployer { + deployer = repositories.mavenDeployer { configuration = configurations.deployerJars - pom.whenConfigured {pom -> - def optionalDeps = ['commons-logging', 'ehcache', 'log4j', 'apacheds-core', 'apacheds-server-jndi', 'jsp-api', 'slf4j-api', 'slf4j-log4j12', 'jsr250-api', 'ldapsdk'] - def providedDeps = ['servlet-api'] - pom.dependencies.findAll {dep -> optionalDeps.contains(dep.artifactId) }*.optional = true - pom.dependencies.findAll {dep -> providedDeps.contains(dep.artifactId) }*.scope = 'provided' - } } doFirst { if (releaseBuild) { @@ -52,4 +48,23 @@ uploadArchives { } } -conf2ScopeMappings.addMapping(1, configurations.provided, "provided") \ No newline at end of file +// Pom Customization + +installer = install.repositories.mavenInstaller + +def optionalDeps = ['commons-logging', 'ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk'] + +[installer, deployer]*.pom*.whenConfigured { pom -> + pom.scopeMappings.addMapping(10, configurations.provided, 'provided') + + pom.dependencies.findAll { dep -> + optionalDeps.contains(dep.artifactId) || + dep.groupId.startsWith('org.apache.directory') || + dep.groupId.startsWith('org.slf4j') + }*.optional = true + + if (pom.artifactId == 'spring-security-config') { + pom.dependencies.find { dep -> dep.artifactId == 'spring-security-web'}.optional = true + pom.dependencies.find { dep -> dep.artifactId == 'spring-web'}.optional = true + } +} diff --git a/itest/web/itest-web.gradle b/itest/web/itest-web.gradle index 1a72da5bc3..6ba082f47d 100644 --- a/itest/web/itest-web.gradle +++ b/itest/web/itest-web.gradle @@ -1,13 +1,13 @@ dependencies { compile "org.springframework:spring-context:$springVersion", - "org.springframework:spring-web:$springVersion", - 'javax.servlet:servlet-api:2.5' + "org.springframework:spring-web:$springVersion" + + provided 'javax.servlet:servlet-api:2.5' testCompile project(':spring-security-core'), project(':spring-security-web'), project(':spring-security-taglibs'), - "org.springframework:spring-core:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-webmvc:$springVersion", "org.mortbay.jetty:jetty:$jettyVersion", diff --git a/ldap/ldap.gradle b/ldap/ldap.gradle index c7de42711a..4bd8091054 100644 --- a/ldap/ldap.gradle +++ b/ldap/ldap.gradle @@ -4,18 +4,22 @@ test.exclude('**/OpenLDAPIntegrationTestSuite.class') dependencies { compile project(':spring-security-core'), - "org.springframework:spring-core:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-context:$springVersion", "org.springframework:spring-tx:$springVersion", - "org.springframework.ldap:spring-ldap-core:$springLdapVersion", "org.apache.directory.server:apacheds-core:$apacheDsVersion", "org.apache.directory.server:apacheds-core-entry:$apacheDsVersion", "org.apache.directory.server:apacheds-protocol-shared:$apacheDsVersion", "org.apache.directory.server:apacheds-protocol-ldap:$apacheDsVersion", "org.apache.directory.server:apacheds-server-jndi:$apacheDsVersion", - 'org.apache.directory.shared:shared-ldap:0.9.15', + 'org.apache.directory.shared:shared-ldap:0.9.15', 'ldapsdk:ldapsdk:4.1' + compile ("org.springframework.ldap:spring-ldap-core:$springLdapVersion") { + exclude(group: 'commons-logging', module: 'commons-logging') + exclude(group: 'org.springframework', module: 'spring-core') + exclude(group: 'org.springframework', module: 'spring-tx') + exclude(group: 'org.springframework', module: 'spring-beans') + } runtime 'org.slf4j:slf4j-log4j12:1.4.3' } \ No newline at end of file diff --git a/openid/openid.gradle b/openid/openid.gradle index e1810b32dc..814d480259 100644 --- a/openid/openid.gradle +++ b/openid/openid.gradle @@ -5,13 +5,12 @@ dependencies { project(':spring-security-web'), 'org.openid4java:openid4java-nodeps:0.9.5', "org.springframework:spring-aop:$springVersion", - "org.springframework:spring-core:$springVersion", "org.springframework:spring-context:$springVersion", "org.springframework:spring-beans:$springVersion", - "org.springframework:spring-tx:$springVersion", + "org.springframework:spring-tx:$springVersion", "org.springframework:spring-web:$springVersion" - provided "javax.servlet:servlet-api:2.5" + provided 'javax.servlet:servlet-api:2.5' runtime 'commons-httpclient:commons-httpclient:3.1' } \ No newline at end of file diff --git a/pom.xml b/pom.xml index 207a032087..bfad73d162 100644 --- a/pom.xml +++ b/pom.xml @@ -441,6 +441,11 @@ maven-surefire-report-plugin 2.4.2 + + org.apache.maven.plugins + maven-dependency-plugin + 2.1 + org.apache.maven.plugins maven-jxr-plugin diff --git a/samples/cas/cas.gradle b/samples/cas/cas.gradle index bff5dc0e99..0bd7994d8d 100644 --- a/samples/cas/cas.gradle +++ b/samples/cas/cas.gradle @@ -2,11 +2,8 @@ apply id: 'war' apply id: 'jetty' dependencies { -// providedCompile 'javax.servlet:servlet-api:2.5@jar' - runtime project(':spring-security-core'), project(':spring-security-web'), project(':spring-security-config'), -// project(':taglibs'), 'log4j:log4j:1.2.15@jar' } \ No newline at end of file diff --git a/samples/contacts/contacts.gradle b/samples/contacts/contacts.gradle index 0eddb980b4..4e0f4a3a1f 100644 --- a/samples/contacts/contacts.gradle +++ b/samples/contacts/contacts.gradle @@ -5,10 +5,10 @@ apply id: 'jetty' dependencies { providedCompile 'javax.servlet:servlet-api:2.5@jar' + compile project(':spring-security-core'), project(':spring-security-acl'), "org.springframework:spring-aop:$springVersion", - "org.springframework:spring-core:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-context:$springVersion", "org.springframework:spring-jdbc:$springVersion", diff --git a/samples/tutorial/tutorial.gradle b/samples/tutorial/tutorial.gradle index 52623feb13..c8c0643abb 100644 --- a/samples/tutorial/tutorial.gradle +++ b/samples/tutorial/tutorial.gradle @@ -5,8 +5,8 @@ apply id: 'jetty' dependencies { providedCompile 'javax.servlet:servlet-api:2.5@jar' + compile project(':spring-security-core'), - "org.springframework:spring-core:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-web:$springVersion", "org.springframework:spring-webmvc:$springVersion", diff --git a/sandbox/heavyduty/build.gradle b/sandbox/heavyduty/build.gradle index 1f23df1df8..75341a155a 100644 --- a/sandbox/heavyduty/build.gradle +++ b/sandbox/heavyduty/build.gradle @@ -1,23 +1,17 @@ -usePlugin('war') -usePlugin('jetty') -usePlugin('project-reports') +apply: 'war' +apply: 'jetty' +//apply: 'project-reports' -version = '3.0.0.CI-SNAPSHOT' -springVersion = '3.0.0.RELEASE' -targetCompatibility = '1.5' +version = '3.1.0.CI-SNAPSHOT' +springVersion = '3.0.1.RELEASE' +targetCompatibility = '1.5' sourceCompatibility = '1.5' repositories { - mavenRepo name:'localRepo', urls:'file:///Users/luke/.m2/repository' -} - -configurations { -// runtime.excludeRules.add(org: 'org.apache.commons') + mavenRepo name:'Local', urls: "file://" + System.properties['user.home'] + "/.m2/repository" } dependencies { - // - // NB: Transient deps are all runtime deps (unlike maven) compile 'aopalliance:aopalliance:1.0', "org.springframework.security:spring-security-core:$version", "org.springframework.security:spring-security-web:$version", @@ -27,27 +21,23 @@ dependencies { "org.springframework:spring-tx:$springVersion", "org.springframework:spring-web:$springVersion", "org.springframework:spring-webmvc:$springVersion", - 'commons-logging:commons-logging:1.1.1', - "org.aspectj:aspectjrt:1.6.5", - 'org.hibernate:ejb3-persistence:1.0.2.GA' - 'javax.persistence:persistence-api:1.0' + 'org.aspectj:aspectjrt:1.6.8', + 'org.hibernate:ejb3-persistence:1.0.2.GA', + 'javax.persistence:persistence-api:1.0', + 'org.slf4j:jcl-over-slf4j:1.5.11' - providedCompile "javax.servlet:servlet-api:2.5" + providedCompile 'javax.servlet:servlet-api:2.5' runtime 'org.hibernate:hibernate-entitymanager:3.4.0.GA', - "org.springframework:spring-context-support:$springVersion", - "org.springframework.security:spring-security-ldap:$version", + "org.springframework:spring-context-support:$springVersion", + "org.springframework.security:spring-security-ldap:$version", "org.springframework.security:spring-security-config:$version", - "org.springframework.security:spring-security-taglibs:$version", + "org.springframework.security:spring-security-taglibs:$version", "org.springframework:spring-orm:$springVersion", 'org.apache.directory.server:apacheds-core:1.5.5', 'org.apache.directory.server:apacheds-server-jndi:1.5.5', 'org.freemarker:freemarker:2.3.16', "hsqldb:hsqldb:1.8.0.10", - 'org.slf4j:slf4j-log4j12:1.5.8', + 'org.slf4j:slf4j-log4j12:1.5.11', 'log4j:log4j:1.2.14' } - -task ('pcomp') { - println configurations.compile -} diff --git a/sandbox/heavyduty/pom.xml b/sandbox/heavyduty/pom.xml index 91c52215e4..b9fe7de4dd 100755 --- a/sandbox/heavyduty/pom.xml +++ b/sandbox/heavyduty/pom.xml @@ -26,12 +26,22 @@ spring-security-taglibs ${spring.security.version} - org.springframework spring-context-support ${spring.version} + + org.springframework + spring-core + ${spring.version} + + + commons-logging + commons-logging + + + org.springframework spring-web @@ -117,6 +127,7 @@ runtime 1.1.2 + commons-collections commons-collections @@ -140,20 +152,25 @@ org.slf4j slf4j-api - 1.5.8 + 1.5.10 runtime + + org.slf4j + jcl-over-slf4j + 1.5.10 + org.slf4j slf4j-log4j12 - 1.5.8 + 1.5.10 runtime log4j log4j runtime - 1.2.14 + 1.2.15 @@ -176,6 +193,11 @@ 2.0 + + org.apache.maven.plugins + maven-dependency-plugin + 2.1 + org.mortbay.jetty maven-jetty-plugin @@ -204,7 +226,7 @@ - 3.0.0.RELEASE + 3.0.1.RELEASE 3.1.0.CI-SNAPSHOT diff --git a/taglibs/taglibs.gradle b/taglibs/taglibs.gradle index 0c253d8d80..7765bf5f15 100644 --- a/taglibs/taglibs.gradle +++ b/taglibs/taglibs.gradle @@ -4,7 +4,6 @@ dependencies { compile project(':spring-security-core'), project(':spring-security-web'), project(':spring-security-acl'), - "org.springframework:spring-core:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-context:$springVersion", "org.springframework:spring-expression:$springVersion", diff --git a/web/web.gradle b/web/web.gradle index ef8b061dfa..6357370cd2 100644 --- a/web/web.gradle +++ b/web/web.gradle @@ -5,7 +5,6 @@ dependencies { 'aopalliance:aopalliance:1.0', "org.aspectj:aspectjweaver:$aspectjVersion", "org.springframework:spring-aop:$springVersion", - "org.springframework:spring-core:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-context:$springVersion", "org.springframework:spring-expression:$springVersion",