Skip to content

Commit

Permalink
Merge branch 'cleanup-3.2.x' into SPR-9431
Browse files Browse the repository at this point in the history
Catch up to latest changes on cleanup-3.2.x in order to avoid conflicts
when adding additional commits fixing compiler warnings.
  • Loading branch information
cbeams committed Jan 4, 2013
2 parents 3ac4554 + b836e14 commit 0351787
Show file tree
Hide file tree
Showing 3,202 changed files with 15,942 additions and 42,065 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -13,12 +13,15 @@ jmx.log
derby.log
spring-test/test-output/
.gradle
build
.classpath
.project
argfile*
pom.xml

/build
buildSrc/build
/spring-*/build

# IDEA artifacts and output dirs
*.iml
*.ipr
Expand Down
16 changes: 8 additions & 8 deletions CONTRIBUTING.md
Expand Up @@ -23,34 +23,34 @@ truly trivial, e.g. typo fixes, removing compiler warnings, etc.

If you're considering anything more than correcting a typo or fixing a minor
bug, please discuss it on the [spring-framework-contrib][] mailing list before
submitting a pull request. We're happy to provide guidance but please spend an
submitting a pull request. We're happy to provide guidance, but please spend an
hour or two researching the subject on your own including searching the mailing
list for prior discussions.

## Sign the Contributor License Agreement

If you have not previously done so, please fill out and submit the
[SpringSource CLA form][]. You'll receive a token when this process is complete.
Keep track of this, you may be asked for it later!
Keep track of this; you may be asked for it later!

Note that emailing/postal mailing a signed copy is _not_ necessary. Submission
of the web form is all that is required.

When you've completed the web form, simply add the following in a comment on
Once you've completed the web form, simply add the following in a comment on
your pull request:

I have signed and agree to the terms of the SpringSource Individual
Contributor License Agreement.

You do not need to include your token/id. Please add the statement above to all
future pull requests as well, simply so the Spring Framework team knows
future pull requests as well, simply so that the Spring Framework team knows
immediately that this process is complete.


## Create your branch from `3.2.x`

If your pull request addresses a bug or improvement, please create your branch
Spring Framework's `3.2.x` branch. `master` is reserved for work on new features
from Spring Framework's `3.2.x` branch. `master` is reserved for work on new features
for the next major version of the framework. Rest assured that if your pull
request is accepted and merged into `3.2.x`, these changes will also eventually
be merged into `master`.
Expand All @@ -72,7 +72,7 @@ Please carefully follow the whitespace and formatting conventions already
present in the framework.

1. Tabs, not spaces
1. Unix (LF), not dos (CRLF) line endings
1. Unix (LF), not DOS (CRLF) line endings
1. Eliminate all trailing whitespace
1. Wrap Javadoc at 90 characters
1. Aim to wrap code at 90 characters, but favor readability over wrapping
Expand Down Expand Up @@ -228,11 +228,11 @@ Most importantly, please format your commit messages in the following way

1. Use imperative statements in the subject line, e.g. "Fix broken Javadoc link"
1. Begin the subject line sentence with a capitalized verb, e.g. "Add, Prune,
Fix, Introduce, Avoid, etc"
Fix, Introduce, Avoid, etc."
1. Do not end the subject line with a period
1. Keep the subject line to 50 characters or less if possible
1. Wrap lines in the body at 72 characters or less
1. Mention associated jira issue(s) at the end of the commit comment, prefixed
1. Mention associated JIRA issue(s) at the end of the commit comment, prefixed
with "Issue: " as above
1. In the body of the commit message, explain how things worked before this
commit, what has changed, and how things work now
Expand Down
131 changes: 93 additions & 38 deletions build.gradle
Expand Up @@ -8,32 +8,32 @@ buildscript {
}
}

configure(allprojects) {
configure(allprojects) { project ->
group = "org.springframework"
version = qualifyVersionIfNecessary(version)

ext.aspectjVersion = "1.7.1"
ext.easymockVersion = "2.5.2"
ext.hsqldbVersion = "1.8.0.10"
ext.junitVersion = "4.11"
ext.slf4jVersion = "1.6.1"
ext.gradleScriptDir = "${rootProject.projectDir}/gradle"

if (rootProject.hasProperty("VERSION_QUALIFIER")) {
def qualifier = rootProject.getProperty("VERSION_QUALIFIER")
if (qualifier.startsWith("SPR-")) { // topic branch, e.g. SPR-1234
// replace 3.2.0.BUILD-SNAPSHOT for 3.2.0.SPR-1234-SNAPSHOT
version = version.replace('BUILD', qualifier)
}
}

apply plugin: "propdeps"
apply plugin: "java"
apply plugin: "propdeps-eclipse"
apply plugin: "propdeps-idea"
apply plugin: "test-source-set-dependencies"
apply from: "${gradleScriptDir}/ide.gradle"

group = "org.springframework"

sourceCompatibility=1.5
targetCompatibility=1.5
compileJava {
sourceCompatibility=1.5
targetCompatibility=1.5
}
compileTestJava {
sourceCompatibility=1.7
targetCompatibility=1.7
}

[compileJava, compileTestJava]*.options*.compilerArgs = [
"-Xlint:serial",
Expand All @@ -58,17 +58,26 @@ configure(allprojects) {

sourceSets.test.resources.srcDirs = ["src/test/resources", "src/test/java"]

test.systemProperty("java.awt.headless", "true")
test {
systemProperty("java.awt.headless", "true")
systemProperty("testGroups", properties.get("testGroups"))
}

repositories {
maven { url "http://repo.springsource.org/libs-release" }
maven { url "http://repo.springsource.org/ebr-maven-external" }
}

dependencies {
testCompile("junit:junit:${junitVersion}")
testCompile("org.hamcrest:hamcrest-all:1.3")
testCompile("org.easymock:easymock:${easymockVersion}")
testCompile("org.mockito:mockito-core:1.9.5")
if (project.name in ["spring", "spring-jms", "spring-orm",
"spring-orm-hibernate4", "spring-oxm", "spring-struts",
"spring-test", "spring-test-mvc", "spring-tx", "spring-web",
"spring-webmvc", "spring-webmvc-portlet", "spring-webmvc-tiles3"]) {
testCompile("org.easymock:easymock:${easymockVersion}")
testCompile "org.easymock:easymockclassextension:${easymockVersion}"
}
}

ext.javadocLinks = [
Expand All @@ -94,7 +103,7 @@ configure(allprojects) {
] as String[]
}

configure(subprojects) { subproject ->
configure(subprojects - project(":spring-build-src")) { subproject ->
apply plugin: "merge"
apply from: "${gradleScriptDir}/publish-maven.gradle"

Expand Down Expand Up @@ -143,6 +152,17 @@ configure(subprojects) { subproject ->
}
}

project("spring-build-src") {
description = "Exposes gradle buildSrc for IDE support"
apply plugin: "groovy"

dependencies {
compile gradleApi()
groovy localGroovy()
}

configurations.archives.artifacts.clear()
}

project("spring-core") {
description = "Spring Core"
Expand Down Expand Up @@ -214,7 +234,7 @@ project("spring-core") {
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
optional("net.sf.jopt-simple:jopt-simple:3.0")
optional("log4j:log4j:1.2.17")
testCompile("xmlunit:xmlunit:1.2")
testCompile("xmlunit:xmlunit:1.3")
testCompile("org.codehaus.woodstox:wstx-asl:3.2.7")
}

Expand Down Expand Up @@ -304,7 +324,7 @@ project("spring-context") {
optional("org.aspectj:aspectjweaver:${aspectjVersion}")
optional("org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1")
testCompile("commons-dbcp:commons-dbcp:1.2.2")
testCompile("javax.inject:com.springsource.org.atinject.tck:1.0.0")
testCompile("javax.inject:javax.inject-tck:1")
}

test {
Expand All @@ -324,7 +344,6 @@ project("spring-tx") {
optional("javax.resource:connector-api:1.5")
optional("org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1")
optional("javax.ejb:ejb-api:3.0")
testCompile "org.easymock:easymockclassextension:${easymockVersion}"
testCompile("javax.persistence:persistence-api:1.0")
testCompile("org.aspectj:aspectjweaver:${aspectjVersion}")
}
Expand All @@ -333,6 +352,14 @@ project("spring-tx") {
project("spring-oxm") {
description = "Spring Object/XML Marshalling"
apply from: "oxm.gradle"

compileTestJava {
// necessary to avoid java.lang.VerifyError on jibx compilation
// see http://jira.codehaus.org/browse/JIBX-465
sourceCompatibility=1.6
targetCompatibility=1.6
}

dependencies {
compile(project(":spring-beans"))
compile(project(":spring-core"))
Expand All @@ -344,7 +371,7 @@ project("spring-oxm") {
optional("org.apache.xmlbeans:xmlbeans:2.4.0")
optional("org.codehaus.castor:castor-xml:1.3.2")
testCompile("org.codehaus.jettison:jettison:1.0.1")
testCompile("xmlunit:xmlunit:1.2")
testCompile("xmlunit:xmlunit:1.3")
testCompile("xmlpull:xmlpull:1.1.3.4a")
testCompile(files(genCastor.classesDir).builtBy(genCastor))
testCompile(files(genJaxb.classesDir).builtBy(genJaxb))
Expand Down Expand Up @@ -449,7 +476,7 @@ project("spring-web") {
}
optional("log4j:log4j:1.2.17")
testCompile(project(":spring-context-support")) // for JafMediaTypeFactory
testCompile("xmlunit:xmlunit:1.2")
testCompile("xmlunit:xmlunit:1.3")
}

// pick up ContextLoader.properties in src/main
Expand All @@ -458,6 +485,14 @@ project("spring-web") {

project("spring-orm") {
description = "Spring Object/Relational Mapping"

compileTestJava {
// necessary to avoid java.lang.VerifyError on toplink compilation
// TODO: remove this block when we remove toplink
sourceCompatibility=1.6
targetCompatibility=1.6
}

dependencies {
compile("aopalliance:aopalliance:1.0")
optional("org.hibernate:hibernate-core:3.3.2.GA")
Expand All @@ -477,7 +512,6 @@ project("spring-orm") {
testCompile("org.eclipse.persistence:org.eclipse.persistence.asm:1.0.1")
testCompile("org.eclipse.persistence:org.eclipse.persistence.antlr:1.0.1")
testCompile("hsqldb:hsqldb:${hsqldbVersion}")
testCompile(project(":spring-web").sourceSets.test.output)
compile(project(":spring-core"))
compile(project(":spring-beans"))
optional(project(":spring-aop"))
Expand Down Expand Up @@ -533,7 +567,7 @@ project("spring-webmvc") {
testCompile(project(":spring-aop"))
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
testCompile("rhino:js:1.7R1")
testCompile("xmlunit:xmlunit:1.2")
testCompile("xmlunit:xmlunit:1.3")
testCompile("dom4j:dom4j:1.6.1") {
exclude group: "xml-apis", module: "xml-apis"
}
Expand All @@ -553,7 +587,6 @@ project("spring-webmvc") {
testCompile("commons-io:commons-io:1.3")
testCompile("org.hibernate:hibernate-validator:4.3.0.Final")
testCompile("org.apache.httpcomponents:httpclient:4.2")
testCompile(project(":spring-web").sourceSets.test.output)
}

// pick up DispatcherServlet.properties in src/main
Expand All @@ -565,6 +598,7 @@ project("spring-webmvc-tiles3") {
merge.into = project(":spring-webmvc")
dependencies {
compile(project(":spring-context"))
compile(project(":spring-web"))
provided("javax.el:el-api:1.0")
provided("javax.servlet:jstl:1.2")
provided("javax.servlet.jsp:jsp-api:2.1")
Expand All @@ -583,7 +617,6 @@ project("spring-webmvc-tiles3") {
exclude group: "org.slf4j", module: "jcl-over-slf4j"
}
provided("javax.servlet:javax.servlet-api:3.0.1")
compile(project(":spring-web").sourceSets*.output) // mock request & response
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
}
}
Expand All @@ -607,6 +640,10 @@ project("spring-webmvc-portlet") {

project("spring-test") {
description = "Spring TestContext Framework"
test {
useJUnit()
useTestNG()
}
dependencies {
compile(project(":spring-core"))
optional(project(":spring-beans"))
Expand Down Expand Up @@ -642,7 +679,7 @@ project("spring-test-mvc") {
provided("javax.servlet:javax.servlet-api:3.0.1")
optional("org.hamcrest:hamcrest-core:1.3")
optional("com.jayway.jsonpath:json-path:0.8.1")
optional("xmlunit:xmlunit:1.2")
optional("xmlunit:xmlunit:1.3")
testCompile("org.slf4j:slf4j-jcl:${slf4jVersion}")
testCompile("javax.servlet:jstl:1.2")
testCompile("org.hibernate:hibernate-validator:4.3.0.Final")
Expand All @@ -656,7 +693,6 @@ project("spring-test-mvc") {
testCompile("javax.activation:activation:1.1")
testCompile("javax.mail:mail:1.4")
testCompile("javax.xml.bind:jaxb-api:2.2.6")
testCompile("org.easymock:easymockclassextension:${easymockVersion}")
testCompile("org.apache.tiles:tiles-request-api:1.0.1")
testCompile("org.apache.tiles:tiles-api:3.0.1")
testCompile("org.apache.tiles:tiles-core:3.0.1") {
Expand Down Expand Up @@ -763,18 +799,20 @@ configure(rootProject) {
project.sourceSets.main.allJava
}

classpath = files(
// ensure servlet 3.x and Hibernate 4.x have precedence on the Javadoc
// classpath over their respective 2.5 and 3.x variants
project(":spring-webmvc").sourceSets.main.compileClasspath.files.find { it =~ "servlet-api" },
rootProject.sourceSets.test.compileClasspath.files.find { it =~ "hibernate-core" },
// ensure the javadoc process can resolve types compiled from .aj sources
project(":spring-aspects").sourceSets.main.output
)
classpath += files(subprojects.collect { it.sourceSets.main.compileClasspath })

maxMemory = "1024m"
destinationDir = new File(buildDir, "api")

doFirst {
classpath = files(
// ensure servlet 3.x and Hibernate 4.x have precedence on the Javadoc
// classpath over their respective 2.5 and 3.x variants
project(":spring-webmvc").sourceSets.main.compileClasspath.files.find { it =~ "servlet-api" },
rootProject.sourceSets.test.compileClasspath.files.find { it =~ "hibernate-core" },
// ensure the javadoc process can resolve types compiled from .aj sources
project(":spring-aspects").sourceSets.main.output
)
classpath += files(subprojects.collect { it.sourceSets.main.compileClasspath })
}
}

task docsZip(type: Zip) {
Expand Down Expand Up @@ -917,3 +955,20 @@ configure(rootProject) {
}
}
}

/*
* Support publication of artifacts versioned by topic branch.
* CI builds supply `-P BRANCH_NAME=<TOPIC>` to gradle at build time.
* If <TOPIC> starts with 'SPR-', change version
* from BUILD-SNAPSHOT => <TOPIC>-SNAPSHOT
* e.g. 3.2.1.BUILD-SNAPSHOT => 3.2.1.SPR-1234-SNAPSHOT
*/
def qualifyVersionIfNecessary(version) {
if (rootProject.hasProperty("BRANCH_NAME")) {
def qualifier = rootProject.getProperty("BRANCH_NAME")
if (qualifier.startsWith("SPR-")) {
return version.replace('BUILD', qualifier)
}
}
return version
}
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.springframework.build.gradle.merge
package org.springframework.build.gradle

import org.gradle.api.*
import org.gradle.api.artifacts.Configuration
Expand Down

0 comments on commit 0351787

Please sign in to comment.