Update configuration of Spring IO plugin

This commit updates the configuration of the IO plugin to use an
external property, platformVersion, and to only apply the plugin when
this property is set. This removes the declaration of a snapshot
dependency from the normal build configuration and also breaks a
circular dependency between the projects that are in the Platform and
the Platform itself.

The commit also applies the configuration that was applied to the
standard test task, other than code coverage, to the new test tasks
that are created by the Spring IO plugin.

Two redundant Hibernate mapping files have been deleted. With more
recent versions of Hibernate the presence of these files was causing
test failures due to duplicate mappings.
This commit is contained in:
Andy Wilkinson
2014-05-14 16:45:33 +01:00
committed by Michael Minella
parent 4fe22fc511
commit 513e47fc9b
3 changed files with 25 additions and 45 deletions

View File

@@ -10,7 +10,7 @@ buildscript {
dependencies {
classpath 'org.springframework.build.gradle:docbook-reference-plugin:0.2.8'
classpath 'org.springframework.build.gradle:propdeps-plugin:0.0.5'
classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE'
classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE'
}
}
@@ -21,6 +21,8 @@ ext {
linkScmUrl = 'https://github.com/spring-projects/spring-batch'
linkScmConnection = 'git://github.com/spring-projects/spring-batch.git'
linkScmDevConnection = 'git@github.com:spring-projects/spring-batch.git'
mainProjects = subprojects.findAll { !it.name.endsWith('tests') && !it.name.endsWith('samples') }
}
allprojects {
@@ -50,7 +52,6 @@ allprojects {
springDataNeo4jVersion = '3.1.0.RC1'
springIntegrationVersion = '4.0.0.RELEASE'
springLdapVersion = '2.0.1.RELEASE'
springIoVersion = '1.0.0.BUILD-SNAPSHOT'
activemqVersion = '5.9.1'
aspectjVersion = '1.8.0'
@@ -131,7 +132,7 @@ subprojects { subproject ->
ext.xLintArg = '-Xlint:all'
[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg]
test {
tasks.withType(Test).all {
// suppress all console output during testing unless running `gradle -i`
logging.captureStandardOutput(LogLevel.INFO)
systemProperty "ENVIRONMENT", environmentProperty
@@ -145,6 +146,13 @@ subprojects { subproject ->
exclude '**/Abstract*.class'
}
test {
jacoco {
append = false
destinationFile = file("$buildDir/jacoco.exec")
}
}
task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allJava
@@ -195,8 +203,21 @@ subprojects { subproject ->
}
}
configure(mainProjects) {
if (project.hasProperty('platformVersion')) {
apply plugin: 'spring-io'
repositories {
maven { url "https://repo.spring.io/libs-snapshot" }
}
dependencies {
springIoVersions "io.spring.platform:platform-versions:${platformVersion}@properties"
}
}
}
project('spring-batch-core') {
apply plugin: 'spring-io'
description = 'Spring Batch Core'
dependencies {
@@ -233,13 +254,10 @@ project('spring-batch-core') {
optional "log4j:log4j:$log4jVersion"
provided "javax.batch:javax.batch-api:$javaxBatchApiVersion"
springIoVersions "io.spring.platform:platform-versions:$springIoVersion@properties"
}
}
project('spring-batch-infrastructure') {
apply plugin: 'spring-io'
description = 'Spring Batch Infrastructure'
dependencies {
@@ -308,8 +326,6 @@ project('spring-batch-infrastructure') {
optional "org.springframework.ldap:spring-ldap-core:$springLdapVersion"
optional "org.springframework.ldap:spring-ldap-core-tiger:$springLdapVersion"
optional "org.springframework.ldap:spring-ldap-ldif-core:$springLdapVersion"
springIoVersions "io.spring.platform:platform-versions:$springIoVersion@properties"
}
}
@@ -413,7 +429,6 @@ project('spring-batch-infrastructure-tests') {
//Domain for batch job testing
project('spring-batch-test') {
apply plugin: 'spring-io'
description = 'Spring Batch Test'
dependencies {
@@ -432,13 +447,10 @@ project('spring-batch-test') {
testCompile "org.hsqldb:hsqldb:$hsqldbVersion"
optional "org.aspectj:aspectjrt:$aspectjVersion"
springIoVersions "io.spring.platform:platform-versions:$springIoVersion@properties"
}
}
project('spring-batch-integration') {
apply plugin: 'spring-io'
description = 'Batch Integration'
dependencies {
@@ -480,8 +492,6 @@ project('spring-batch-integration') {
optional "log4j:log4j:1.2.14"
optional "org.springframework.integration:spring-integration-jms:$springIntegrationVersion"
optional "org.springframework:spring-jms:$springVersion"
springIoVersions "io.spring.platform:platform-versions:$springIoVersion@properties"
}
}

View File

@@ -1,15 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.springframework.batch.item.sample.Foo" table="T_WRITE_FOOS">
<id name="id" column="ID">
<generator class="increment"/>
</id>
<property name="name" />
<property name="value" />
</class>
</hibernate-mapping>

View File

@@ -1,15 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="org.springframework.batch.item.sample.Foo" table="T_WRITE_FOOS">
<id name="id" column="ID">
<generator class="increment"/>
</id>
<property name="name" />
<property name="value" />
</class>
</hibernate-mapping>