Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Instead of using a separate configuration for the agent to avoid it b…

…eing exported in the POM, use a dynamic property on dependencies to determine what should be exported.

To have any dependency not be exported in the POM, define it like this…

dependencies {
  «scope» («notation») {
    notInPom = true
  }
}
  • Loading branch information...
commit 8333442c81352816d18dfbd9e63826301a6c9cc2 1 parent 8fba66c
@alkemist alkemist authored
Showing with 14 additions and 22 deletions.
  1. +9 −0 build.gradle
  2. +1 −1  gradle/assemble.gradle
  3. +4 −21 grails-core/build.gradle
View
9 build.gradle
@@ -234,6 +234,15 @@ subprojects { project ->
project.poms*.whenConfigured {
project.pomModifications*.call(it)
}
+
+ // Remove any dependencies that shouldn't be included in the POM
+ modifyPom { pom ->
+ configurations.runtime.allDependencies.each { dependency ->
+ if (dependency.hasProperty("notInPom") && dependency.notInPom) {
+ pom.dependencies.removeAll { it.groupId == dependency.group && it.artifactId == dependency.name }
+ }
+ }
+ }
}
task clean(type: Delete) {
View
2  gradle/assemble.gradle
@@ -7,7 +7,7 @@ subprojects { subproject ->
configurations {
libsConfigurations << libs {
extendsFrom compile, runtime
- ["jsp21", "agent"].collect { configurations.findByName(it) }.findAll { it != null }.each { extendsFrom it }
+ ["jsp21"].collect { configurations.findByName(it) }.findAll { it != null }.each { extendsFrom it }
}
}
}
View
25 grails-core/build.gradle
@@ -1,12 +1,3 @@
-configurations {
- agent.extendsFrom compile
-}
-
-eclipse {
- classpath {
- plusConfigurations += configurations.agent
- }
-}
dependencies {
compile "commons-collections:commons-collections:${commonsCollectionsVersion}"
compile "commons-io:commons-io:${commonsIOVersion}"
@@ -62,22 +53,14 @@ dependencies {
exclude group: 'xml-apis', module:'xml-apis'
}
- agent "com.springsource.springloaded:springloaded-core:$springLoadedVersion"
+ compile ("com.springsource.springloaded:springloaded-core:$springLoadedVersion") {
+ notInPom = true
+ }
compile "org.springframework:spring-tx:${springVersion}"
compile project(":grails-bootstrap"), project(":grails-spring")
}
-sourceSets {
- main {
- compileClasspath = configurations.agent
- }
-}
-
-javadoc {
- classpath += configurations.agent
-}
-
compileGroovy.doFirst {
delete("${buildDir}/classes/main/META-INF")
ant.mkdir(dir:sourceSets.main.output.classesDir)
@@ -86,4 +69,4 @@ compileGroovy.doFirst {
}
}
-jar.appendix = 'core'
+jar.appendix = 'core'
Please sign in to comment.
Something went wrong with that request. Please try again.