diff --git a/build.gradle b/build.gradle index 863d68b30..e2f654242 100644 --- a/build.gradle +++ b/build.gradle @@ -46,56 +46,55 @@ allprojects { environmentProperty = project.hasProperty('environment') ? getProperty('environment') : 'hsql' - springVersionDefault = '5.0.0.RC3' + springVersionDefault = '5.0.0.RELEASE' springVersion = project.hasProperty('springVersion') ? getProperty('springVersion') : springVersionDefault - springRetryVersion = '1.2.0.RELEASE' - springAmqpVersion = '2.0.0.M5' - springDataCommonsVersion = '2.0.0.RC2' - springDataGemfireVersion = '2.0.0.RC2' - springDataJpaVersion = '2.0.0.RC2' - springDataMongodbVersion = '2.0.0.RC2' - springDataNeo4jVersion = '5.0.0.RC2' - springIntegrationVersion = '5.0.0.M6' - springLdapVersion = '2.3.1.RELEASE' + springRetryVersion = '1.2.1.RELEASE' + springAmqpVersion = '2.0.0.RELEASE' + springDataCommonsVersion = '2.0.0.RELEASE' + springDataGemfireVersion = '2.0.0.RELEASE' + springDataJpaVersion = '2.0.0.RELEASE' + springDataMongodbVersion = '2.0.0.RELEASE' + springDataNeo4jVersion = '5.0.0.RELEASE' + springIntegrationVersion = '5.0.0.M7' + springLdapVersion = '2.3.2.RELEASE' - activemqVersion = '5.14.5' - aspectjVersion = '1.8.10' + activemqVersion = '5.15.1' + aspectjVersion = '1.8.12' castorVersion = '1.4.1' commonsCollectionsVersion = '3.2.2' - commonsDdbcpVersion = '1.4' - commonsIoVersion = '2.4' - commonsLangVersion = '2.6' + commonsDdbcpVersion = '2.1.1' + commonsIoVersion = '2.6' + commonsLangVersion = '3.6' commonsPoolVersion = '1.6' - derbyVersion = '10.13.1.1' - groovyVersion = '2.4.11' + derbyVersion = '10.14.1.0' + groovyVersion = '2.5.0-beta-1' hamcrestVersion = '1.3' - h2databaseVersion = '1.4.195' - hibernateVersion = '5.2.10.Final' - hibernateValidatorVersion = '5.4.1.Final' + h2databaseVersion = '1.4.196' + hibernateVersion = '5.2.12.Final' + hibernateValidatorVersion = '6.0.3.Final' hsqldbVersion = '2.4.0' - jackson2Version = "2.9.0.pr3" - javaMailVersion = '1.6.0-rc1' + jackson2Version = "2.9.2" + javaMailVersion = '1.6.0' javaxBatchApiVersion = '1.0' javaxInjectVersion = '1' javaxTransactionVersion = '1.2' jbatchTckSpi = '1.0' - jettisonVersion = '1.2' + jettisonVersion = '1.2' //? jmsVersion = '2.0.1' - jtdsVersion = '1.3.1' //? junitVersion = '4.12' log4jVersion = '2.8.2' - mysqlVersion = '5.1.42' - mockitoVersion = '2.7.22' - postgresqlVersion = '42.1.1' + mysqlVersion = '5.1.44' + mockitoVersion = '2.11.0' + postgresqlVersion = '42.1.4' quartzVersion = '2.3.0' servletApiVersion = '3.1.0' slf4jVersion = '1.7.25' - sqlfireclientVersion = '1.0.3' //? - sqliteVersion = '3.8.11.2' //? - woodstoxVersion = '4.2.1' + sqlfireclientVersion = '1.0.3' + sqliteVersion = '3.20.1' + woodstoxVersion = '5.0.3' xercesVersion = '2.11.0' //? - xmlunitVersion = '1.5' - xstreamVersion = '1.4.9' + xmlunitVersion = '2.5.0' + xstreamVersion = '1.4.10' jrubyVersion = '1.7.26' beanshellVersion = '2.0b5' } @@ -278,7 +277,7 @@ project('spring-batch-core') { testCompile "org.hsqldb:hsqldb:$hsqldbVersion" testCompile "com.h2database:h2:$h2databaseVersion" testCompile "commons-io:commons-io:$commonsIoVersion" - testCompile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + testCompile "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" testCompile "junit:junit:${junitVersion}" testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion" optional "com.ibm.jbatch:com.ibm.jbatch-tck-spi:$jbatchTckSpi" @@ -309,7 +308,7 @@ project('spring-batch-infrastructure') { testCompile "org.apache.logging.log4j:log4j-api:$log4jVersion" testCompile "org.apache.logging.log4j:log4j-core:$log4jVersion" testCompile "commons-io:commons-io:$commonsIoVersion" - testCompile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + testCompile "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" testCompile "org.hsqldb:hsqldb:$hsqldbVersion" testCompile "com.h2database:h2:$h2databaseVersion" testCompile "org.apache.derby:derby:$derbyVersion" @@ -361,7 +360,7 @@ project('spring-batch-infrastructure') { exclude group: "org.springframework", module: "spring-aspects" } optional "org.springframework.data:spring-data-gemfire:$springDataGemfireVersion" - compile("org.codehaus.woodstox:woodstox-core-asl:$woodstoxVersion") { dep -> + compile("com.fasterxml.woodstox:woodstox-core:$woodstoxVersion") { dep -> optional dep exclude group: 'stax', module: 'stax-api' } @@ -395,7 +394,7 @@ project('spring-batch-core-tests') { dependencies { compile project(":spring-batch-core") compile project(":spring-batch-infrastructure") - compile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + compile "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" compile "org.springframework:spring-jdbc:$springVersion" compile "org.springframework.retry:spring-retry:$springRetryVersion" compile "org.springframework:spring-tx:$springVersion" @@ -432,7 +431,7 @@ project('spring-batch-infrastructure-tests') { dependencies { compile project(":spring-batch-infrastructure") compile "javax.jms:javax.jms-api:$jmsVersion" - compile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + compile "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" compile "org.springframework:spring-tx:$springVersion" compile "org.springframework:spring-aop:$springVersion" @@ -444,7 +443,8 @@ project('spring-batch-infrastructure-tests') { testCompile "junit:junit:${junitVersion}" testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion" testCompile "org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:1.0.1" - testCompile "xmlunit:xmlunit:$xmlunitVersion" + testCompile "org.xmlunit:xmlunit-core:$xmlunitVersion" + testCompile "org.xmlunit:xmlunit-matchers:$xmlunitVersion" testCompile ("org.codehaus.castor:castor-xml:$castorVersion") { exclude group: 'stax', module: 'stax' exclude group: 'commons-lang', module: 'commons-lang' @@ -453,10 +453,10 @@ project('spring-batch-infrastructure-tests') { testCompile "org.apache.logging.log4j:log4j-core:$log4jVersion" testCompile "xerces:xercesImpl:$xercesVersion" testCompile "com.thoughtworks.xstream:xstream:$xstreamVersion" - testCompile("org.codehaus.woodstox:woodstox-core-asl:$woodstoxVersion") { + testCompile("com.fasterxml.woodstox:woodstox-core:$woodstoxVersion") { exclude group: 'stax', module: 'stax-api' } - testCompile "commons-lang:commons-lang:$commonsLangVersion" + testCompile "org.apache.commons:commons-lang3:$commonsLangVersion" testCompile("org.springframework:spring-oxm:$springVersion") { exclude group: 'commons-lang', module: 'commons-lang' } @@ -499,7 +499,7 @@ project('spring-batch-test') { compile "commons-io:commons-io:$commonsIoVersion" compile "commons-collections:commons-collections:$commonsCollectionsVersion" - testCompile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + testCompile "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" testCompile "org.hsqldb:hsqldb:$hsqldbVersion" optional "org.aspectj:aspectjrt:$aspectjVersion" @@ -528,7 +528,7 @@ project('spring-batch-integration') { testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion" testCompile "org.aspectj:aspectjrt:$aspectjVersion" testCompile "org.aspectj:aspectjweaver:$aspectjVersion" - testCompile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + testCompile "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" testCompile "com.h2database:h2:$h2databaseVersion" testCompile "mysql:mysql-connector-java:$mysqlVersion" testCompile "org.apache.derby:derby:$derbyVersion" @@ -563,9 +563,9 @@ project('spring-batch-samples') { compile "org.aspectj:aspectjweaver:$aspectjVersion" compile "org.quartz-scheduler:quartz:$quartzVersion" compile "commons-io:commons-io:$commonsIoVersion" - compile "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + compile "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" compile "com.thoughtworks.xstream:xstream:$xstreamVersion" - compile("org.codehaus.woodstox:woodstox-core-asl:$woodstoxVersion") { + compile("com.fasterxml.woodstox:woodstox-core:$woodstoxVersion") { exclude group: 'stax', module: 'stax-api' } compile("org.hibernate:hibernate-core:$hibernateVersion") { dep -> @@ -589,7 +589,8 @@ project('spring-batch-samples') { compile "org.springframework.data:spring-data-jpa:$springDataJpaVersion" compile "javax.mail:javax.mail-api:$javaMailVersion" - testCompile "xmlunit:xmlunit:$xmlunitVersion" + testCompile "org.xmlunit:xmlunit-core:$xmlunitVersion" + testCompile "org.xmlunit:xmlunit-matchers:$xmlunitVersion" testCompile project(":spring-batch-test") testCompile "junit:junit:${junitVersion}" testCompile "org.hamcrest:hamcrest-library:$hamcrestVersion" @@ -604,7 +605,6 @@ project('spring-batch-samples') { testRuntime "com.sun.mail:javax.mail:$javaMailVersion" provided "mysql:mysql-connector-java:$mysqlVersion" - provided "net.sourceforge.jtds:jtds:$jtdsVersion" provided "com.h2database:h2:$h2databaseVersion" provided "javax.servlet:javax.servlet-api:$servletApiVersion" @@ -866,7 +866,7 @@ task runTck(dependsOn: subprojects.compileJava) { tck "org.springframework:spring-jdbc:$springVersion" tck "com.thoughtworks.xstream:xstream:$xstreamVersion" tck "org.codehaus.jettison:jettison:$jettisonVersion" - tck "commons-dbcp:commons-dbcp:$commonsDdbcpVersion" + tck "org.apache.commons:commons-dbcp2:$commonsDdbcpVersion" tck "org.apache.derby:derby:$derbyVersion" antcp "ant-contrib:ant-contrib:1.0b3" diff --git a/spring-batch-core-tests/src/test/resources/data-source-context.xml b/spring-batch-core-tests/src/test/resources/data-source-context.xml index 568ea2eb6..ea6edb753 100644 --- a/spring-batch-core-tests/src/test/resources/data-source-context.xml +++ b/spring-batch-core-tests/src/test/resources/data-source-context.xml @@ -17,7 +17,7 @@ - + diff --git a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java index e9fb886b3..c5506e9f9 100644 --- a/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java +++ b/spring-batch-core/src/main/java/org/springframework/batch/core/jsr/launch/JsrJobOperator.java @@ -104,7 +104,7 @@ import org.springframework.util.Assert; * </bean> * * <bean id="dataSource" - * class="org.apache.commons.dbcp.BasicDataSource"> + * class="org.apache.commons.dbcp2.BasicDataSource"> * ... * </bean> * diff --git a/spring-batch-core/src/main/resources/jsrBaseContext.xml b/spring-batch-core/src/main/resources/jsrBaseContext.xml index e71d499d9..1b1c67421 100644 --- a/spring-batch-core/src/main/resources/jsrBaseContext.xml +++ b/spring-batch-core/src/main/resources/jsrBaseContext.xml @@ -28,7 +28,7 @@ - + diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/explore/support/SimpleJobExplorerIntegrationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/explore/support/SimpleJobExplorerIntegrationTests.java index 71315187e..3c2a6b7cf 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/explore/support/SimpleJobExplorerIntegrationTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/explore/support/SimpleJobExplorerIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2013-2014 the original author or authors. + * Copyright 2013-2017 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. @@ -15,14 +15,14 @@ */ package org.springframework.batch.core.explore.support; -import static org.junit.Assert.assertEquals; - import java.util.ArrayList; import java.util.List; -import org.apache.commons.dbcp.BasicDataSource; +import org.apache.commons.dbcp2.BasicDataSource; import org.junit.Test; import org.junit.runner.RunWith; +import test.jdbc.datasource.DataSourceInitializer; + import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.JobInstance; @@ -53,7 +53,7 @@ import org.springframework.core.io.Resource; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import test.jdbc.datasource.DataSourceInitializer; +import static org.junit.Assert.assertEquals; /** * Integration test for the BATCH-2034 issue. diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/AsyncChunkOrientedStepIntegrationTests.java b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/AsyncChunkOrientedStepIntegrationTests.java index feae22a13..6db05ec00 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/AsyncChunkOrientedStepIntegrationTests.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/step/tasklet/AsyncChunkOrientedStepIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2013 the original author or authors. + * Copyright 2006-2017 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. @@ -15,12 +15,18 @@ */ package org.springframework.batch.core.step.tasklet; -import org.apache.commons.dbcp.BasicDataSource; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import org.apache.commons.dbcp2.BasicDataSource; import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; + import org.springframework.batch.core.BatchStatus; import org.springframework.batch.core.Job; import org.springframework.batch.core.JobExecution; @@ -44,11 +50,6 @@ import org.springframework.transaction.TransactionStatus; import org.springframework.transaction.support.TransactionCallback; import org.springframework.transaction.support.TransactionTemplate; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.List; - import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -64,7 +65,7 @@ public class AsyncChunkOrientedStepIntegrationTests { private Job job; - private List written = new ArrayList(); + private List written = new ArrayList<>(); @Autowired private PlatformTransactionManager transactionManager; @@ -88,18 +89,18 @@ public class AsyncChunkOrientedStepIntegrationTests { @After public void reset() { // Reset concurrency settings to something reasonable - dataSource.setMaxActive(maxActive); + dataSource.setMaxTotal(maxActive); dataSource.setMaxIdle(maxIdle); } @Before public void init() throws Exception { - maxActive = dataSource.getMaxActive(); + maxActive = dataSource.getMaxTotal(); maxIdle = dataSource.getMaxIdle(); // Force deadlock with batch waiting for DB pool and vice versa - dataSource.setMaxActive(1); + dataSource.setMaxTotal(1); dataSource.setMaxIdle(1); step = new TaskletStep("stepName"); @@ -123,7 +124,7 @@ public class AsyncChunkOrientedStepIntegrationTests { @Ignore public void testStatus() throws Exception { - step.setTasklet(new TestingChunkOrientedTasklet(getReader(new String[] { "a", "b", "c", "a", "b", "c", + step.setTasklet(new TestingChunkOrientedTasklet<>(getReader(new String[] { "a", "b", "c", "a", "b", "c", "a", "b", "c", "a", "b", "c" }), new ItemWriter() { @Override public void write(List data) throws Exception { diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/OptimisticLockingFailureTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/OptimisticLockingFailureTests-context.xml index 784e4a869..83cb97853 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/OptimisticLockingFailureTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/OptimisticLockingFailureTests-context.xml @@ -71,7 +71,7 @@ - + diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/TablePrefixTests-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/TablePrefixTests-context.xml index 57e08c097..f139ee91c 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/TablePrefixTests-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/TablePrefixTests-context.xml @@ -28,7 +28,7 @@ - + diff --git a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml index 33cb1d0b0..7e3da1009 100644 --- a/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml +++ b/spring-batch-core/src/test/resources/org/springframework/batch/core/repository/dao/data-source-context.xml @@ -11,7 +11,7 @@ - + diff --git a/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/AbstractStaxEventWriterItemWriterTests.java b/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/AbstractStaxEventWriterItemWriterTests.java index 0f6b153eb..4013ba44a 100644 --- a/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/AbstractStaxEventWriterItemWriterTests.java +++ b/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/AbstractStaxEventWriterItemWriterTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2010-2014 the original author or authors. + * Copyright 2010-2017 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. @@ -16,20 +16,19 @@ package org.springframework.batch.item.xml; import java.io.File; -import java.io.FileReader; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.custommonkey.xmlunit.XMLAssert; -import org.custommonkey.xmlunit.XMLUnit; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.xmlunit.builder.Input; +import org.xmlunit.matchers.CompareMatcher; + import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.xml.StaxEventItemWriter; import org.springframework.batch.item.xml.domain.Trade; import org.springframework.batch.support.transaction.ResourcelessTransactionManager; import org.springframework.core.io.ClassPathResource; @@ -42,6 +41,8 @@ import org.springframework.transaction.support.TransactionTemplate; import org.springframework.util.ClassUtils; import org.springframework.util.StopWatch; +import static org.junit.Assert.assertThat; + public abstract class AbstractStaxEventWriterItemWriterTests { private Log logger = LogFactory.getLog(getClass()); @@ -93,11 +94,10 @@ public abstract class AbstractStaxEventWriterItemWriterTests { writer.close(); stopWatch.stop(); logger.info("Timing for XML writer: " + stopWatch); - XMLUnit.setIgnoreWhitespace(true); - // String content = FileUtils.readFileToString(resource.getFile()); - // System.err.println(content); - XMLAssert.assertXMLEqual(new FileReader(expected.getFile()), new FileReader(resource.getFile())); + assertThat( + Input.from(expected.getFile()), + CompareMatcher.isSimilarTo(Input.from(resource.getFile()))); } @Before diff --git a/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/Jaxb2NamespaceMarshallingTests.java b/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/Jaxb2NamespaceMarshallingTests.java index ad6fd40d6..271866e47 100644 --- a/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/Jaxb2NamespaceMarshallingTests.java +++ b/spring-batch-infrastructure-tests/src/test/java/org/springframework/batch/item/xml/Jaxb2NamespaceMarshallingTests.java @@ -15,26 +15,22 @@ */ package org.springframework.batch.item.xml; -import static org.junit.Assert.assertTrue; - import java.io.File; -import java.io.FileReader; import java.io.StringWriter; import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; - import javax.xml.transform.stream.StreamResult; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.custommonkey.xmlunit.XMLAssert; -import org.custommonkey.xmlunit.XMLUnit; import org.junit.After; import org.junit.Before; import org.junit.Test; +import org.xmlunit.builder.Input; +import org.xmlunit.matchers.CompareMatcher; + import org.springframework.batch.item.ExecutionContext; -import org.springframework.batch.item.xml.StaxEventItemWriter; import org.springframework.batch.item.xml.domain.QualifiedTrade; import org.springframework.batch.support.transaction.ResourcelessTransactionManager; import org.springframework.core.io.ClassPathResource; @@ -48,6 +44,9 @@ import org.springframework.transaction.support.TransactionTemplate; import org.springframework.util.ClassUtils; import org.springframework.util.StopWatch; +import static org.junit.Assert.assertThat; +import static org.junit.Assert.assertTrue; + public class Jaxb2NamespaceMarshallingTests { private Log logger = LogFactory.getLog(getClass()); @@ -99,11 +98,10 @@ public class Jaxb2NamespaceMarshallingTests { writer.close(); stopWatch.stop(); logger.info("Timing for XML writer: " + stopWatch); - XMLUnit.setIgnoreWhitespace(true); - // String content = FileUtils.readFileToString(resource.getFile()); - // System.err.println(content); - XMLAssert.assertXMLEqual(new FileReader(expected.getFile()), new FileReader(resource.getFile())); + assertThat( + Input.from(expected.getFile()), + CompareMatcher.isSimilarTo(Input.from(resource.getFile()))); } @Before diff --git a/spring-batch-infrastructure-tests/src/test/resources/data-source-context.xml b/spring-batch-infrastructure-tests/src/test/resources/data-source-context.xml index 2779dfb6e..a09ee95de 100644 --- a/spring-batch-infrastructure-tests/src/test/resources/data-source-context.xml +++ b/spring-batch-infrastructure-tests/src/test/resources/data-source-context.xml @@ -13,7 +13,7 @@ - + diff --git a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeTestUtils.java b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeTestUtils.java index 5f866cbbd..c9f8df102 100644 --- a/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeTestUtils.java +++ b/spring-batch-infrastructure/src/test/java/org/springframework/batch/support/DatabaseTypeTestUtils.java @@ -1,5 +1,5 @@ /* - * Copyright 2006-2007 the original author or authors. + * Copyright 2006-2017 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. @@ -15,15 +15,14 @@ */ package org.springframework.batch.support; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - import java.sql.Connection; import java.sql.DatabaseMetaData; - import javax.sql.DataSource; -import org.apache.commons.dbcp.BasicDataSource; +import org.apache.commons.dbcp2.BasicDataSource; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; /** * @author Dave Syer diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml index 00ef321f5..664aad6c1 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/chunk/RemoteChunkFaultTolerantStepJdbcIntegrationTests-context.xml @@ -101,7 +101,7 @@ - + diff --git a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml index fbaf64421..3a1fa5fed 100644 --- a/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml +++ b/spring-batch-integration/src/test/resources/org/springframework/batch/integration/config/xml/RemoteChunkingMasterParserTests.xml @@ -48,7 +48,7 @@ - diff --git a/spring-batch-samples/src/main/java/org/springframework/batch/sample/config/DataSourceConfiguration.java b/spring-batch-samples/src/main/java/org/springframework/batch/sample/config/DataSourceConfiguration.java index 2983f9957..c11ff9ed9 100644 --- a/spring-batch-samples/src/main/java/org/springframework/batch/sample/config/DataSourceConfiguration.java +++ b/spring-batch-samples/src/main/java/org/springframework/batch/sample/config/DataSourceConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2013 the original author or authors. + * Copyright 2012-2017 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. @@ -18,7 +18,8 @@ package org.springframework.batch.sample.config; import javax.annotation.PostConstruct; import javax.sql.DataSource; -import org.apache.commons.dbcp.BasicDataSource; +import org.apache.commons.dbcp2.BasicDataSource; + import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/spring-batch-samples/src/main/resources/data-source-context.xml b/spring-batch-samples/src/main/resources/data-source-context.xml index 6cbfc6061..755b879d2 100644 --- a/spring-batch-samples/src/main/resources/data-source-context.xml +++ b/spring-batch-samples/src/main/resources/data-source-context.xml @@ -11,12 +11,12 @@ - + - + diff --git a/spring-batch-test/src/test/resources/data-source-context.xml b/spring-batch-test/src/test/resources/data-source-context.xml index 747195996..c34b3324a 100755 --- a/spring-batch-test/src/test/resources/data-source-context.xml +++ b/spring-batch-test/src/test/resources/data-source-context.xml @@ -16,7 +16,7 @@ - +