LDAP-311: Fix optional dependencies in spring-ldap-core

This commit is contained in:
Rob Winch
2015-04-24 10:37:39 -05:00
parent 26c0609739
commit e6dfd25d36
3 changed files with 21 additions and 9 deletions

View File

@@ -23,6 +23,7 @@ ext.coreModules = subprojects.findAll { p-> (!p.name.contains("test") && !p.name
configure(allprojects) {
apply plugin: 'propdeps'
apply plugin: 'propdeps-maven'
apply plugin: 'propdeps-idea'
apply plugin: 'propdeps-eclipse'
apply plugin: 'groovy'

View File

@@ -11,16 +11,16 @@ idea.module.excludeDirs = [
dependencies {
compile "org.springframework:spring-core:$springVersion",
"org.springframework:spring-beans:$springVersion",
"org.springframework:spring-tx:$springVersion",
"org.springframework.data:spring-data-commons:$springDataVersion"
"org.slf4j:slf4j-api:$slf4jVersion"
"org.springframework:spring-tx:$springVersion"
provided "commons-pool:commons-pool:$commonsPoolVersion",
"com.sun:ldapbp:1.0",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-orm:$springVersion",
"com.mysema.querydsl:querydsl-apt:$queryDslVersion"
optional "org.springframework.data:spring-data-commons:$springDataVersion",
"org.springframework:spring-context:$springVersion",
"org.springframework:spring-jdbc:$springVersion",
"org.springframework:spring-orm:$springVersion",
"com.mysema.querydsl:querydsl-apt:$queryDslVersion",
"commons-pool:commons-pool:$commonsPoolVersion"
provided "com.sun:ldapbp:1.0"
testCompile "junit:junit:$junitVersion",
"commons-lang:commons-lang:$commonsLangVersion",

View File

@@ -8,6 +8,17 @@ def customizePom(pom, gradleProject) {
def isWar = project.hasProperty('war')
def projectName = gradleProject.name
pom.whenConfigured { p ->
p.dependencies.findAll{ it.scope == "optional" }.each {
it.scope = "compile"
it.optional = true
}
// sort to make pom dependencies order consistent to ease comparison of older poms
p.dependencies = p.dependencies.sort { dep ->
"$dep.scope:$dep.optional:$dep.groupId:$dep.artifactId"
}
}
pom.project {
name = projectName
if(isWar) {