From 9d58317731ddcde527b78c74ccb2172b53e55f3c Mon Sep 17 00:00:00 2001 From: Rob Winch Date: Mon, 5 Aug 2013 11:08:23 -0500 Subject: [PATCH] Use included configuration instead of sourceSets.main.output Previously the crypto module was not exported in Eclipse because it was listed as a test dependency to have it added as a dependency. Note that this was all to work around GRADLE-1116 Now we add an included configuration that is exported for Eclipse, but not added to the Maven pom (since all the crypto module is included in core). --- core/core.gradle | 17 ++++++++++------- core/pom.xml | 6 ------ gradle/ide-integration.gradle | 6 ------ 3 files changed, 10 insertions(+), 19 deletions(-) diff --git a/core/core.gradle b/core/core.gradle index 54eff07451..37a077e370 100644 --- a/core/core.gradle +++ b/core/core.gradle @@ -4,9 +4,14 @@ def cryptoProject = project(':spring-security-crypto') def cryptoClasses = cryptoProject.sourceSets.main.output +configurations { + included + + compile.extendsFrom included +} + dependencies { - compile cryptoProject.sourceSets.main.output, - 'aopalliance:aopalliance:1.0', + compile 'aopalliance:aopalliance:1.0', "org.springframework:spring-aop:$springVersion", "org.springframework:spring-beans:$springVersion", "org.springframework:spring-context:$springVersion", @@ -18,8 +23,9 @@ dependencies { "org.springframework:spring-jdbc:$springVersion", "org.springframework:spring-tx:$springVersion" - testCompile cryptoProject, - 'commons-collections:commons-collections:3.2', + included cryptoProject + + testCompile 'commons-collections:commons-collections:3.2', "org.springframework:spring-test:$springVersion", "org.slf4j:jcl-over-slf4j:$slf4jVersion", powerMockDependencies @@ -28,9 +34,6 @@ dependencies { "cglib:cglib-nodep:$cglibVersion" } -compileJava.dependsOn cryptoProject.compileJava -classes.dependsOn cryptoProject.classes - classes.doLast { copy { from cryptoClasses diff --git a/core/pom.xml b/core/pom.xml index 3bf9544fd2..e9954b0a2d 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -200,12 +200,6 @@ 1.7.5 test - - org.springframework.security - spring-security-crypto - 3.2.0.CI-SNAPSHOT - test - org.springframework spring-test diff --git a/gradle/ide-integration.gradle b/gradle/ide-integration.gradle index a3d14427a9..8b1f962b6e 100644 --- a/gradle/ide-integration.gradle +++ b/gradle/ide-integration.gradle @@ -8,12 +8,6 @@ configure(allprojects) { configure(javaProjects) { eclipse.classpath.downloadSources = true - // GRADLE-1116 - project.eclipse.classpath.file.whenMerged { classpath -> - classpath.entries.removeAll { entry -> entry.path.endsWith('/build/resources/test') } - classpath.entries.removeAll { entry -> entry.path.endsWith('/build/classes/test') } - classpath.entries.removeAll { entry -> entry.path.endsWith('/build/resources/main') } - classpath.entries.removeAll { entry -> entry.path.endsWith('/build/classes/main') } } // GRADLE-1422