Permalink
Fetching contributors…
Cannot retrieve contributors at this time
545 lines (484 sloc) 22 KB
/*
* Copyright 2002-2011 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import org.springframework.build.Version
// -----------------------------------------------------------------------------
// Main gradle build file for Spring Integration
//
// - run `./gradlew(.bat) build` to kick off a complete compile-test-package
//
// @author Chris Beams
// @author Mark Fisher
// @author Oleg Zhurakousky
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Configuration for the root project
// -----------------------------------------------------------------------------
// used for artifact names, building doc upload urls, etc.
description = 'Spring Integration'
abbreviation = 'INT'
apply plugin: 'base'
apply plugin: 'idea'
def buildSrcDir = "$rootDir/buildSrc"
apply from: "$buildSrcDir/wrapper.gradle"
apply from: "$buildSrcDir/maven-root-pom.gradle"
// Tie pom generation into the standard build lifecycle (INT-1609)
assemble.dependsOn generatePom
// -----------------------------------------------------------------------------
// Configuration for all projects including this one (the root project)
//
// @see settings.gradle for list of all subprojects
// -----------------------------------------------------------------------------
allprojects {
// group will translate to groupId during pom generation and deployment
group = 'org.springframework.integration'
// version will be used in maven pom generation as well as determining
// where artifacts should be deployed, based on release type of snapshot,
// milestone or release.
// @see org.springframework.build.Version under buildSrc/ for more info
// @see gradle.properties for the declaration of this property.
version = new Version(springIntegrationVersion)
// default set of maven repositories to be used when resolving dependencies
repositories {
//mavenRepo name: 'SpringSource Snapshot Repository', urls: 'http://maven.springframework.org/snapshot'
mavenRepo name: 'SpringSource Milestone Repository', urls: 'http://maven.springframework.org/milestone'
mavenCentral()
// only really necessary for artifacts not yet in Maven Central, i.e. immediately post-release
mavenRepo name: 'SpringSource Release Repository', urls: 'http://maven.springframework.org/release'
// needed for bundlor:
mavenRepo name: 'SpringSource Release Bundle Repository', urls: 'http://repository.springsource.com/maven/bundles/release'
// needed for external dependencies required by bundlor:
mavenRepo name: 'SpringSource External Bundle Repository', urls: 'http://repository.springsource.com/maven/bundles/external'
}
}
// -----------------------------------------------------------------------------
// Create collections of subprojects - each will receive their own configuration
// - all subprojects that start with spring-integration-* are 'java projects'
// - documentation-related subprojects are not collected here
//
// @see configure(*) sections below
// -----------------------------------------------------------------------------
javaprojects = subprojects.findAll { project ->
project.path.startsWith(':spring-integration-')
}
// -----------------------------------------------------------------------------
// Configuration for all java subprojects
// -----------------------------------------------------------------------------
configure(javaprojects) {
apply plugin: 'java' // tasks for conventional java lifecycle
apply plugin: 'maven' // `gradle install` to push jars to local .m2 cache
apply plugin: 'eclipse' // `gradle eclipse` to generate .classpath/.project
apply plugin: 'idea' // `gradle idea` to generate .ipr/.iml
apply plugin: 'bundlor' // all core projects should be OSGi-compliant
// ensure JDK 5 compatibility (GRADLE-18; INT-1578)
sourceCompatibility=1.5
targetCompatibility=1.5
// set up dedicated directories for jars and source jars.
// this makes it easier when putting together the distribution
libsBinDir = new File(libsDir, 'bin')
libsSrcDir = new File(libsDir, 'src')
// add tasks for creating source jars and generating poms etc
apply from: "$buildSrcDir/maven-deployment.gradle"
// add tasks for finding and publishing .xsd files
apply from: "$buildSrcDir/schema-publication.gradle"
aspectjVersion = '1.6.8'
cglibVersion = '2.2'
commonsNetVersion = '2.0'
easymockVersion = '2.3'
jacksonVersion = '1.8.3'
javaxActivationVersion = '1.1.1'
junitVersion = '4.8.2'
log4jVersion = '1.2.12'
mockitoVersion = '1.8.4'
springVersion = '3.0.6.RELEASE'
springAmqpVersion = '1.0.0.RELEASE'
springDataMongoVersion = '1.0.0.M4'
springDataRedisVersion = '1.0.0.RC1'
springGemfireVersion = '1.1.0.M3'
springSecurityVersion = '3.0.6.RELEASE'
springWsVersion = '2.0.2.RELEASE'
sourceSets {
test {
resources {
srcDirs = ['src/test/resources', 'src/test/java']
}
}
}
// dependencies that are common across all java projects
dependencies {
testCompile "cglib:cglib-nodep:$cglibVersion"
testCompile "junit:junit-dep:$junitVersion"
testCompile "log4j:log4j:$log4jVersion"
testCompile "org.easymock:easymock:$easymockVersion"
testCompile "org.easymock:easymockclassextension:$easymockVersion"
testCompile "org.hamcrest:hamcrest-all:1.1"
testCompile "org.mockito:mockito-all:$mockitoVersion"
testCompile "org.springframework:spring-test:$springVersion"
}
// enable all compiler warnings; individual projects may customize further
xLintArg = '-Xlint:all'
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg]
// Tie pom generation into the standard build lifecycle (INT-1609)
assemble.dependsOn generatePom
test {
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
}
}
// -----------------------------------------------------------------------------
// Configuration for each individual core java subproject
//
// @see configure(javaprojects) above for general config
// -----------------------------------------------------------------------------
project('spring-integration-amqp') {
description = 'Spring Integration AMQP Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile("org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion") { optional = true }
compile("org.springframework.amqp:spring-rabbit:$springAmqpVersion") {
exclude group: 'org.springframework', module: 'spring-aop'
exclude group: 'org.springframework', module: 'spring-beans'
exclude group: 'org.springframework', module: 'spring-context'
exclude group: 'org.springframework', module: 'spring-core'
exclude group: 'org.springframework', module: 'spring-oxm'
exclude group: 'org.springframework', module: 'spring-tx'
}
testCompile project(":spring-integration-stream")
testCompile project(":spring-integration-test")
}
}
project('spring-integration-core') {
description = 'Spring Integration Core'
dependencies {
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-context:$springVersion"
compile("org.springframework:spring-tx:$springVersion") { optional = true }
compile("org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion") { optional = true }
testCompile "org.aspectj:aspectjrt:$aspectjVersion"
testCompile "org.aspectj:aspectjweaver:$aspectjVersion"
}
}
project('spring-integration-event') {
description = 'Spring Integration Event Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
testCompile project(":spring-integration-test")
}
}
project('spring-integration-feed') {
description = 'Spring Integration RSS Feed Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile("net.java.dev.rome:rome-fetcher:1.0.0") {
exclude group: 'junit', module: 'junit'
}
compile "net.java.dev.rome:rome:1.0.0"
testCompile project(":spring-integration-test")
}
}
project('spring-integration-file') {
description = 'Spring Integration File Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
testCompile project(":spring-integration-test")
}
}
project('spring-integration-ftp') {
description = 'Spring Integration FTP Support'
dependencies {
compile project(":spring-integration-file")
compile "commons-net:commons-net:$commonsNetVersion"
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
testCompile project(":spring-integration-test")
}
}
project('spring-integration-gemfire') {
description = 'Spring Integration GemFire Support'
test{
forkEvery = 1
systemProperties['gemfire.disableShutdownHook'] = 'true'
}
dependencies {
compile project(":spring-integration-core")
compile ("org.springframework.data.gemfire:spring-gemfire:$springGemfireVersion") {
exclude group: 'org.springframework', module: 'spring-context-support'
exclude group: 'org.springframework', module: 'spring-core'
exclude group: 'org.springframework', module: 'spring-tx'
}
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
testCompile project(":spring-integration-stream")
testCompile project(":spring-integration-test")
}
repositories {
mavenRepo urls: 'http://dist.gemstone.com/maven/release' // for gemfire
}
}
project('spring-integration-groovy') {
description = 'Spring Integration Groovy Support'
dependencies {
compile project(":spring-integration-core")
compile project(":spring-integration-scripting")
compile "org.codehaus.groovy:groovy-all:1.8.4"
compile "org.springframework:spring-context-support:$springVersion"
}
}
project('spring-integration-http') {
description = 'Spring Integration HTTP Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-webmvc:$springVersion"
compile("javax.servlet:servlet-api:2.4") { provided = true }
compile("commons-httpclient:commons-httpclient:3.1") {
optional = true
exclude group: 'junit', module: 'junit'
}
testCompile project(":spring-integration-test")
}
}
project('spring-integration-ip') {
description = 'Spring Integration IP Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
runtime project(":spring-integration-stream")
testCompile project(":spring-integration-test")
}
}
project('spring-integration-jdbc') {
description = 'Spring Integration JDBC Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-jdbc:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
testCompile project(":spring-integration-test")
testCompile "com.h2database:h2:1.3.160"
testCompile "hsqldb:hsqldb:1.8.0.10"
testCompile "org.apache.derby:derby:10.5.3.0_1"
testCompile "org.aspectj:aspectjrt:$aspectjVersion"
testCompile "org.aspectj:aspectjweaver:$aspectjVersion"
}
// suppress derby localization jar path warnings during test compilation
compileTestJava.options.compilerArgs = ["${xLintArg},-path"]
}
project('spring-integration-jms') {
description = 'Spring Integration JMS Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-jms:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile ("org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1") { provided = true }
testCompile project(":spring-integration-test")
testCompile "org.apache.activemq:activemq-core:5.3.0"
testCompile "org.springframework:spring-oxm:$springVersion"
}
}
project('spring-integration-jmx') {
description = 'Spring Integration JMX Support'
dependencies {
compile project(":spring-integration-core")
compile "org.aspectj:aspectjrt:$aspectjVersion"
compile "org.aspectj:aspectjweaver:$aspectjVersion"
compile "org.springframework:spring-context:$springVersion"
testCompile project(":spring-integration-test")
}
}
project('spring-integration-mail') {
description = 'Spring Integration Mail Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.mail:mail:1.4.4") { provided = true }
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
testCompile project(":spring-integration-test")
}
// suppress javax.activation path warnings
[compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"]
}
project('spring-integration-mongodb') {
description = 'Spring Integration MongoDB Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework.data:spring-data-mongodb:$springDataMongoVersion"
testCompile project(":spring-integration-test")
}
}
project('spring-integration-redis') {
description = 'Spring Integration Redis Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile("org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion")
compile("org.codehaus.jackson:jackson-core-asl:$jacksonVersion")
compile ("org.springframework.data:spring-data-redis:$springDataRedisVersion") {
exclude group: 'org.springframework', module: 'spring-core'
exclude group: 'org.springframework', module: 'spring-context-support'
exclude group: 'org.springframework', module: 'spring-beans'
exclude group: 'org.springframework', module: 'spring-tx'
}
testCompile project(":spring-integration-test")
}
}
project('spring-integration-rmi') {
description = 'Spring Integration RMI Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-context:$springVersion"
testCompile project(":spring-integration-test")
}
// suppress deprecation warnings (@SuppressWarnings("deprecation") is not enough for javac)
compileJava.options.compilerArgs = ["${xLintArg},-deprecation"]
}
project('spring-integration-scripting') {
description = 'Spring Integration Scripting Support'
dependencies {
compile project(":spring-integration-core")
testCompile project(":spring-integration-test")
testCompile("org.jruby:jruby:1.6.3")
testCompile("org.codehaus.groovy:groovy-all:1.7.5")
testCompile("org.python:jython-standalone:2.5.2")
}
}
project('spring-integration-security') {
description = 'Spring Integration Security Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-aop:$springVersion"
compile "org.springframework:spring-tx:$springVersion"
compile("org.springframework.security:spring-security-core:$springSecurityVersion") {
exclude group: 'org.springframework', module: 'spring-support'
}
compile("org.springframework.security:spring-security-config:$springSecurityVersion") {
exclude group: 'org.springframework', module: 'spring-support'
}
}
}
project('spring-integration-sftp') {
description = 'Spring Integration SFTP Support'
dependencies {
compile project(":spring-integration-core")
compile project(":spring-integration-file")
compile project(":spring-integration-stream")
compile "com.jcraft:jsch:0.1.42"
compile "org.springframework:spring-context-support:$springVersion"
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
testCompile project(":spring-integration-test")
}
}
project('spring-integration-stream') {
description = 'Spring Integration Stream Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
}
}
project('spring-integration-test') {
description = 'Spring Integration Test Support'
dependencies {
compile project(":spring-integration-core")
compile "junit:junit-dep:$junitVersion"
compile "org.mockito:mockito-all:$mockitoVersion"
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-test:$springVersion"
}
}
project('spring-integration-twitter') {
description = 'Spring Integration Twitter Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context-support:$springVersion"
compile "org.springframework.social:spring-social-twitter:1.0.0.RELEASE"
compile "org.springframework.security:spring-security-crypto:3.1.0.RC3"
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
testCompile project(":spring-integration-test")
}
}
project('spring-integration-ws') {
description = 'Spring Integration Web Services Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-expression:$springVersion"
compile "org.springframework:spring-oxm:$springVersion"
compile "org.springframework:spring-web:$springVersion"
compile ("org.springframework.ws:spring-ws-core:$springWsVersion") {
exclude group: 'org.springframework', module: 'spring-webmvc'
exclude group: 'org.springframework', module: 'spring-web'
exclude group: 'org.springframework', module: 'spring-context-support'
}
compile("javax.xml.soap:saaj-api:1.3") {
optional = true
exclude group: 'javax.activation', module: 'activation'
}
compile("com.sun.xml.messaging.saaj:saaj-impl:1.3") { optional = true }
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
testCompile project(":spring-integration-test")
testCompile "stax:stax-api:1.0.1"
testCompile "xstream:xstream:1.2.2"
}
// suppress saaj path warnings
[compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"]
}
project('spring-integration-xml') {
description = 'Spring Integration XML Support'
dependencies {
compile project(":spring-integration-core")
compile "org.springframework:spring-context:$springVersion"
compile "org.springframework:spring-oxm:$springVersion"
compile ("org.springframework.ws:spring-xml:$springWsVersion") {
exclude group: 'org.springframework', module: 'spring-beans'
exclude group: 'org.springframework', module: 'spring-core'
}
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
testCompile project(":spring-integration-test")
testCompile "javax.xml:jaxb-api:2.0EA3"
testCompile "javax.xml:jaxb-impl:2.0EA3"
testCompile "stax:stax-api:1.0.1"
testCompile "xmlunit:xmlunit:1.2"
}
}
project('spring-integration-xmpp') {
description = 'Spring Integration XMPP Support'
dependencies {
compile project(":spring-integration-core")
compile("javax.activation:activation:$javaxActivationVersion") { optional = true }
compile "jivesoftware:smack:3.1.0"
compile "jivesoftware:smackx:3.1.0"
compile "org.springframework:spring-context-support:$springVersion"
testCompile project(":spring-integration-test")
testCompile project(":spring-integration-stream")
}
// suppress smack path warnings
[compileJava,compileTestJava]*.options*.compilerArgs = ["${xLintArg},-path"]
}
// -----------------------------------------------------------------------------
// Configuration for the docs subproject
// -----------------------------------------------------------------------------
project('docs') {
apply from: "$buildSrcDir/docs.gradle"
}
apply from: "$buildSrcDir/dist.gradle"
apply from: "$buildSrcDir/checks.gradle"