diff --git a/build.gradle b/build.gradle
index 734c3eca..69390790 100644
--- a/build.gradle
+++ b/build.gradle
@@ -5,7 +5,7 @@ buildscript {
dependencies {
classpath("org.springframework.build.gradle:propdeps-plugin:0.0.3")
classpath('org.asciidoctor:asciidoctor-gradle-plugin:0.7.0')
- classpath 'org.springframework.build.gradle:springio-platform-plugin:0.0.2.RELEASE'
+ classpath 'org.springframework.build.gradle:spring-io-plugin:0.0.3.RELEASE'
}
}
@@ -44,7 +44,6 @@ configure(allprojects) {
configure(coreModules) {
apply from: JAVA_MODULE_SCRIPT
- apply plugin: 'springio-platform'
}
configure(subprojects - coreModules) {
diff --git a/gradle/java-module.gradle b/gradle/java-module.gradle
index 894b5e78..7fa9aa7d 100644
--- a/gradle/java-module.gradle
+++ b/gradle/java-module.gradle
@@ -1,35 +1,23 @@
apply from: JAVA_SCRIPT
apply from: MAVEN_DEPLOYMENT_SCRIPT
apply from: RELEASE_CHECKS_SCRIPT
+apply plugin: 'spring-io'
+
+ext.springIoVersion = project.hasProperty('platformVersion') ? platformVersion : '1.0.0.BUILD-SNAPSHOT'
configurations {
jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo
- spring4TestRuntime.extendsFrom testRuntime
-}
-
-configurations.spring4TestRuntime {
- resolutionStrategy.eachDependency { DependencyResolveDetails details ->
- if (details.requested.group == 'org.springframework') {
- details.useVersion '4.0.2.RELEASE'
- }
- }
}
dependencies {
jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.6.2.201302030002", classifier: "runtime"
+ springIoVersions "io.spring.platform:platform-versions:${springIoVersion}@properties"
}
test {
jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=org.springframework.*"
}
-task spring4Test(type: Test) {
- classpath = sourceSets.test.output + sourceSets.main.output + configurations.spring4TestRuntime
- testResultsDir = file("$buildDir/spring4-test-results/")
- testReportDir = file("$buildDir/reports/spring4-tests/")
-}
-check.dependsOn spring4Test
-
jar {
manifest.attributes["Created-By"] =
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
diff --git a/gradle/java.gradle b/gradle/java.gradle
index c2e991be..da4d6721 100644
--- a/gradle/java.gradle
+++ b/gradle/java.gradle
@@ -29,4 +29,5 @@ ext.powerMockDependencies = [
repositories {
mavenCentral()
+ maven { url 'https://repo.spring.io/libs-snapshot' }
}
\ No newline at end of file
diff --git a/ldif/ldif-batch/build.gradle b/ldif/ldif-batch/build.gradle
index ae5a9289..a8c782da 100644
--- a/ldif/ldif-batch/build.gradle
+++ b/ldif/ldif-batch/build.gradle
@@ -17,4 +17,14 @@ dependencies {
testCompile("org.springframework.batch:spring-batch-test:$springBatchVersion") {
exclude group: "org.springframework", module: "spring-test"
}
+}
+
+test {
+ exclude '**/Batch22*.class'
+}
+
+project.tasks.withType(Test).all { t->
+ if(name.startsWith('springIo')) {
+ exclude '**/Batch20*.class'
+ }
}
\ No newline at end of file
diff --git a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch20LdifReaderTest.java b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch20LdifReaderTest.java
new file mode 100644
index 00000000..cb1cec4a
--- /dev/null
+++ b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch20LdifReaderTest.java
@@ -0,0 +1,10 @@
+package org.springframework.ldap.ldif.batch;
+
+import org.springframework.test.context.ContextConfiguration;
+
+/**
+ * @author Rob Winch
+ */
+@ContextConfiguration(locations={"classpath:batch20-applicationContext-test1.xml"})
+public class Batch20LdifReaderTest extends LdifReaderTest {
+}
diff --git a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch20MappingLdifReaderTest.java b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch20MappingLdifReaderTest.java
new file mode 100644
index 00000000..236ae055
--- /dev/null
+++ b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch20MappingLdifReaderTest.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2002-2013 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.
+ */
+package org.springframework.ldap.ldif.batch;
+
+import org.springframework.test.context.ContextConfiguration;
+
+/**
+ * @author Rob Winch
+ */
+@ContextConfiguration(locations={"classpath:batch20-applicationContext-test2.xml"})
+public class Batch20MappingLdifReaderTest extends MappingLdifReaderTest {
+}
diff --git a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch22LdifReaderTest.java b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch22LdifReaderTest.java
new file mode 100644
index 00000000..0e0f9680
--- /dev/null
+++ b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch22LdifReaderTest.java
@@ -0,0 +1,10 @@
+package org.springframework.ldap.ldif.batch;
+
+import org.springframework.test.context.ContextConfiguration;
+
+/**
+ * @author Rob Winch
+ */
+@ContextConfiguration(locations={"classpath:batch22-applicationContext-test1.xml"})
+public class Batch22LdifReaderTest extends LdifReaderTest {
+}
diff --git a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch22MappingLdifReaderTest.java b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch22MappingLdifReaderTest.java
new file mode 100644
index 00000000..02f9b962
--- /dev/null
+++ b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/Batch22MappingLdifReaderTest.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2002-2013 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.
+ */
+package org.springframework.ldap.ldif.batch;
+
+import org.springframework.test.context.ContextConfiguration;
+
+/**
+ * @author Rob Winch
+ */
+@ContextConfiguration(locations={"classpath:batch22-applicationContext-test2.xml"})
+public class Batch22MappingLdifReaderTest extends MappingLdifReaderTest {
+}
diff --git a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/LdifReaderTest.java b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/LdifReaderTest.java
index abdc04e0..b2926a0e 100644
--- a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/LdifReaderTest.java
+++ b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/LdifReaderTest.java
@@ -36,8 +36,7 @@ import java.net.MalformedURLException;
import static org.junit.Assert.fail;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations={"classpath*:applicationContext-test1.xml"})
-public class LdifReaderTest extends AbstractJobTests {
+public abstract class LdifReaderTest extends AbstractJobTests {
private static Logger log = LoggerFactory.getLogger(LdifReaderTest.class);
private Resource expected;
diff --git a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/MappingLdifReaderTest.java b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/MappingLdifReaderTest.java
index bb2664b4..aca03ccb 100644
--- a/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/MappingLdifReaderTest.java
+++ b/ldif/ldif-batch/src/test/java/org/springframework/ldap/ldif/batch/MappingLdifReaderTest.java
@@ -36,8 +36,7 @@ import java.net.MalformedURLException;
import static org.junit.Assert.fail;
@RunWith(SpringJUnit4ClassRunner.class)
-@ContextConfiguration(locations={"classpath*:applicationContext-test2.xml"})
-public class MappingLdifReaderTest extends AbstractJobTests {
+public abstract class MappingLdifReaderTest extends AbstractJobTests {
private static Logger log = LoggerFactory.getLogger(MappingLdifReaderTest.class);
private Resource expected;
diff --git a/ldif/ldif-batch/src/test/resources/applicationContext-test1.xml b/ldif/ldif-batch/src/test/resources/batch20-applicationContext-test1.xml
similarity index 100%
rename from ldif/ldif-batch/src/test/resources/applicationContext-test1.xml
rename to ldif/ldif-batch/src/test/resources/batch20-applicationContext-test1.xml
diff --git a/ldif/ldif-batch/src/test/resources/applicationContext-test2.xml b/ldif/ldif-batch/src/test/resources/batch20-applicationContext-test2.xml
similarity index 100%
rename from ldif/ldif-batch/src/test/resources/applicationContext-test2.xml
rename to ldif/ldif-batch/src/test/resources/batch20-applicationContext-test2.xml
diff --git a/ldif/ldif-batch/src/test/resources/batch22-applicationContext-test1.xml b/ldif/ldif-batch/src/test/resources/batch22-applicationContext-test1.xml
new file mode 100644
index 00000000..4dfb831b
--- /dev/null
+++ b/ldif/ldif-batch/src/test/resources/batch22-applicationContext-test1.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ldif/ldif-batch/src/test/resources/batch22-applicationContext-test2.xml b/ldif/ldif-batch/src/test/resources/batch22-applicationContext-test2.xml
new file mode 100644
index 00000000..191c554b
--- /dev/null
+++ b/ldif/ldif-batch/src/test/resources/batch22-applicationContext-test2.xml
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+