From 6fcaba2c46581b20d895b2db63a7567010e2a09a Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Sun, 7 Mar 2010 23:53:33 +0000 Subject: [PATCH] Moved setting of 'provided' scope mapping on pom out of whenConfigured() so that the mapping is in place when the pom dependencies are assembled. Added 'skipTests' option. --- gradle/javaprojects.gradle | 3 +++ gradle/maven.gradle | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gradle/javaprojects.gradle b/gradle/javaprojects.gradle index d205a70ee8..7295253b03 100644 --- a/gradle/javaprojects.gradle +++ b/gradle/javaprojects.gradle @@ -38,6 +38,9 @@ dependencies { } test { + onlyIf { + !project.hasProperty('skipTests') + } jvmArgs = ['-ea', '-Xms128m', '-Xmx500m', '-XX:MaxPermSize=128m'] } diff --git a/gradle/maven.gradle b/gradle/maven.gradle index bf88b8dc95..0a7ee45d6a 100644 --- a/gradle/maven.gradle +++ b/gradle/maven.gradle @@ -54,9 +54,11 @@ installer = install.repositories.mavenInstaller def optionalDeps = ['commons-logging', 'ehcache', 'log4j', 'apacheds-core', 'jsp-api', 'jsr250-api', 'ldapsdk'] -[installer, deployer]*.pom*.whenConfigured { pom -> +[installer, deployer]*.pom.collect { pom -> pom.scopeMappings.addMapping(10, configurations.provided, 'provided') +} +[installer, deployer]*.pom*.whenConfigured { pom -> pom.dependencies.findAll { dep -> optionalDeps.contains(dep.artifactId) || dep.groupId.startsWith('org.apache.directory') ||