Skip to content

Commit

Permalink
prevents ant, gant etc. going into the runtime/compile scope (build o…
Browse files Browse the repository at this point in the history
…nly) and hence ending up in the war file
  • Loading branch information
graemerocher committed Jan 7, 2013
1 parent 303ec46 commit ebb865f
Show file tree
Hide file tree
Showing 11 changed files with 97 additions and 13 deletions.
33 changes: 32 additions & 1 deletion grails-core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
configurations {
optional
}
dependencies {

compile 'javax.servlet:javax.servlet-api:3.0.1'
Expand Down Expand Up @@ -66,9 +69,37 @@ dependencies {
}

compile "org.springframework:spring-tx:${springVersion}"
compile project(":grails-bootstrap"), project(":grails-spring")
compile project(":grails-bootstrap"), {
exclude group:"org.fusesource.jansi", module:"jansi"
exclude group:"jline", module:"jline"
exclude group:"net.java.dev.jna", module:"jna"

// Ant
exclude group:"org.apache.ant", module:"ant"
exclude group:"org.apache.ant", module:"ant-launcher"
exclude group:"org.apache.ivy", module:"ivy"
exclude group:"org.apache.ant", module:"ant-trax"
exclude group:"org.apache.ant", module:"ant-junit"

exclude group:"org.codehaus.gant", module:"gant_groovy1.8"
}

optional "org.apache.ant:ant:${antVersion}"
optional "jline:jline:$jlineVersion"
optional "org.fusesource.jansi:jansi:$jansiVersion"

optional("org.codehaus.gant:gant_groovy1.8:${gantVersion}") {
exclude group:'commons-cli', module:'commons-cli'
}
compile project(":grails-spring")
}

sourceSets {
main {
compileClasspath += files(configurations.optional)
}
}
javadoc.classpath += files(configurations.optional)
compileGroovy.doFirst {
delete("${buildDir}/classes/main/META-INF")
ant.mkdir(dir:sourceSets.main.output.classesDir)
Expand Down
3 changes: 1 addition & 2 deletions grails-hibernate/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ dependencies {
exclude group: 'commons-logging', module:'commons-logging'
}

compile project(":grails-bootstrap"),
project(":grails-core"),
compile project(":grails-core"),
project(":grails-spring"),
project(":grails-web"),
project(":grails-plugin-domain-class")
Expand Down
3 changes: 1 addition & 2 deletions grails-plugin-datasource/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ dependencies {
runtime 'hsqldb:hsqldb:1.8.0.10',
'com.h2database:h2:1.3.164'

compile project(":grails-core"),
project(':grails-bootstrap')
compile project(":grails-core")
}

jar.appendix = 'plugin-datasource'
2 changes: 1 addition & 1 deletion grails-plugin-domain-class/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
dependencies {

compile project(":grails-bootstrap"), project(":grails-core"), project(":grails-spring")
compile project(":grails-core"), project(":grails-spring")

// Datastore APIs
compile("org.grails:grails-datastore-gorm:$datastoreVersion") {
Expand Down
3 changes: 1 addition & 2 deletions grails-plugin-services/build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
dependencies {
compile "org.springframework:spring-tx:${springVersion}"

compile project(":grails-core"),
project(':grails-bootstrap')
compile project(":grails-core")
}
jar.appendix = 'plugin-services'
10 changes: 8 additions & 2 deletions grails-plugin-tomcat/build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
def tomcatVersion = "7.0.30"
dependencies {

// Ant
compile "org.apache.ant:ant:${antVersion}"
compile "jline:jline:$jlineVersion"
compile "org.fusesource.jansi:jansi:$jansiVersion"


compile "org.apache.tomcat.embed:tomcat-embed-core:$tomcatVersion"
compile "org.apache.tomcat.embed:tomcat-embed-logging-log4j:$tomcatVersion"
runtime "org.apache.tomcat.embed:tomcat-embed-logging-juli:$tomcatVersion"
Expand All @@ -8,7 +15,6 @@ dependencies {
runtime "org.apache.tomcat.embed:tomcat-embed-jasper:$tomcatVersion"
runtime "org.eclipse.jdt.core.compiler:ecj:3.7.2"
compile project(":grails-core"),
project(":grails-web"),
project(':grails-bootstrap')
project(":grails-web")
}
jar.appendix = 'plugin-tomcat'
1 change: 0 additions & 1 deletion grails-plugin-validation/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
dependencies {
compile project(":grails-core"),
project(':grails-bootstrap'),
project(':grails-web'),
project(':grails-plugin-domain-class')
}
Expand Down
21 changes: 21 additions & 0 deletions grails-scripts/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,27 @@ dependencies {
project(":grails-test"),
project(":grails-plugin-testing")
project(":grails-resources")

compile "org.fusesource.jansi:jansi:$jansiVersion",
"jline:jline:$jlineVersion",
"net.java.dev.jna:jna:$jnaVersion"

// Ant
compile "org.apache.ant:ant:${antVersion}",
"org.apache.ant:ant-launcher:${antVersion}",
"org.apache.ivy:ivy:${ivyVersion}"

compile "org.apache.ant:ant-trax:${antTraxVersion}", {
exclude group:"org.apache.ant", module:"ant"
}

compile("org.apache.ant:ant-junit:${antVersion}") {
exclude group:'junit',module:'junit'
}

compile("org.codehaus.gant:gant_groovy1.8:${gantVersion}") {
exclude group:'commons-cli', module:'commons-cli'
}
}

sourceSets {
Expand Down
15 changes: 14 additions & 1 deletion grails-spring/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
dependencies {
compile "org.springframework:spring-tx:${springVersion}"
compile "org.springframework:spring-web:${springVersion}"
compile project(":grails-bootstrap")
compile project(":grails-bootstrap"), {
exclude group:"org.fusesource.jansi", module:"jansi"
exclude group:"jline", module:"jline"
exclude group:"net.java.dev.jna", module:"jna"

// Ant
exclude group:"org.apache.ant", module:"ant"
exclude group:"org.apache.ant", module:"ant-launcher"
exclude group:"org.apache.ivy", module:"ivy"
exclude group:"org.apache.ant", module:"ant-trax"
exclude group:"org.apache.ant", module:"ant-junit"

exclude group:"org.codehaus.gant", module:"gant_groovy1.8"
}
}
jar.appendix = 'spring'
3 changes: 3 additions & 0 deletions grails-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ dependencies {

compile "org.springframework:spring-tx:${springVersion}"

// Ant
compile "org.apache.ant:ant:${antVersion}"
compile "org.apache.ant:ant-junit:${antVersion}"

// Testing
compile "junit:junit:${junitVersion}", project(":grails-plugin-converters"), project(":grails-plugin-mimetypes")
Expand Down
16 changes: 15 additions & 1 deletion grails-web/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
configurations {
jsp21.extendsFrom compile
optional
}

dependencies {
jsp21 'javax.servlet.jsp:jsp-api:2.1'

compile project(":grails-bootstrap"), project(":grails-core"), project(":grails-spring")
compile project(":grails-core"), project(":grails-spring")
compile('commons-el:commons-el:1.0') {
exclude module:'commons-logging'
}
Expand Down Expand Up @@ -33,16 +34,29 @@ dependencies {
compile 'xpp3:xpp3_min:1.1.4c'
runtime 'taglibs:standard:1.1.2'
runtime "javax.servlet:jstl:1.1.2"

optional "org.apache.ant:ant:${antVersion}"
optional "jline:jline:$jlineVersion"
optional "org.fusesource.jansi:jansi:$jansiVersion"

optional("org.codehaus.gant:gant_groovy1.8:${gantVersion}") {
exclude group:'commons-cli', module:'commons-cli'
}

}

sourceSets {
main {
compileClasspath += files(configurations.optional)
}
jsp21 {
compileClasspath = files(configurations.jsp21, main.output)
groovy.srcDirs = ['src/jsp21/groovy']
resources.srcDirs = []
}
}

javadoc.classpath += files(configurations.optional)
jar {
from compileJsp21Groovy.outputs.files
}
Expand Down

0 comments on commit ebb865f

Please sign in to comment.