Add maven pom customization options to build.gradle

This commit is contained in:
Luke Taylor 2010-03-01 01:17:57 +00:00
parent b147652193
commit d39e93ec23
1 changed files with 8 additions and 1 deletions

View File

@ -13,7 +13,8 @@ allprojects {
repositories {
mavenRepo name:'Local', urls:'file:///Users/luke/.m2/repository'
mavenCentral()
// mavenRepo name:'SpringSource Milestone Repo', urls:'http://repository.springsource.com/maven/bundles/milestone'
mavenRepo name:'SpringSource Milestone Repo', urls:'http://repository.springsource.com/maven/bundles/milestone'
mavenRepo name:'SpringSource Maven Snapshot Repo', urls:'http://maven.springframework.org/snapshot/'
}
}
@ -119,6 +120,12 @@ configure(javaProjects()) {
authentication(s3credentials)
}
}
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'
}
}
}