diff --git a/build.gradle b/build.gradle index 3279615c..7264887d 100644 --- a/build.gradle +++ b/build.gradle @@ -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' diff --git a/core/build.gradle b/core/build.gradle index cc0d701b..3ff5eda0 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -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", diff --git a/gradle/maven-deployment.gradle b/gradle/maven-deployment.gradle index ec35993a..2c2eae5c 100644 --- a/gradle/maven-deployment.gradle +++ b/gradle/maven-deployment.gradle @@ -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) {