Version updates
This commit is contained in:
94
build.gradle
94
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"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="${batch.jdbc.driver}" />
|
||||
<property name="url" value="${batch.jdbc.url}" />
|
||||
<property name="username" value="${batch.jdbc.user}" />
|
||||
|
||||
@@ -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>
|
||||
*
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<property name="dataSource" ref="dataSource"/>
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource">
|
||||
<property name="driverClassName" value="${batch.jdbc.driver}" />
|
||||
<property name="url" value="${batch.jdbc.url}" />
|
||||
<property name="username" value="${batch.jdbc.user}" />
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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<String> written = new ArrayList<String>();
|
||||
private List<String> 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<String>(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<String>() {
|
||||
@Override
|
||||
public void write(List<? extends String> data) throws Exception {
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource">
|
||||
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
|
||||
<property name="url" value="jdbc:hsqldb:mem:testd;sql.enforce_strict_size=true;hsqldb.tx=mvcc" />
|
||||
<property name="username" value="sa" />
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource">
|
||||
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
|
||||
<property name="url" value="jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true;hsqldb.tx=mvcc" />
|
||||
<property name="username" value="sa" />
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource">
|
||||
<property name="driverClassName" value="org.hsqldb.jdbcDriver" />
|
||||
<property name="url" value="jdbc:hsqldb:mem:testdb;sql.enforce_strict_size=true;hsqldb.tx=mvcc" />
|
||||
<property name="username" value="sa" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="${batch.jdbc.driver}" />
|
||||
<property name="url" value="${batch.jdbc.url}" />
|
||||
<property name="username" value="${batch.jdbc.user}" />
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
<property name="step" ref="step" />
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource">
|
||||
<property name="driverClassName" value="${batch.jdbc.driver}" />
|
||||
<property name="url" value="${batch.jdbc.url}" />
|
||||
<property name="username" value="${batch.jdbc.user}" />
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
<bean id="placeholderProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"
|
||||
p:location="classpath:batch-${ENVIRONMENT:hsql}.properties"/>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
|
||||
p:driverClassName="${batch.jdbc.driver}" p:url="${batch.jdbc.url}"
|
||||
p:username="${batch.jdbc.user}" p:password="${batch.jdbc.password}"/>
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
<jdbc:script location="${batch.business.schema.script}"/>
|
||||
</jdbc:initialize-database>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close">
|
||||
<property name="driverClassName" value="${batch.jdbc.driver}" />
|
||||
<property name="url" value="${batch.jdbc.url}" />
|
||||
<property name="username" value="${batch.jdbc.user}" />
|
||||
<property name="password" value="${batch.jdbc.password}" />
|
||||
<property name="maxActive" value="${batch.jdbc.pool.size}"/>
|
||||
<property name="maxTotal" value="${batch.jdbc.pool.size}"/>
|
||||
<property name="validationQuery" value="${batch.jdbc.validationQuery}"/>
|
||||
<property name="testWhileIdle" value="${batch.jdbc.testWhileIdle}"/>
|
||||
</bean>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource">
|
||||
<bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource">
|
||||
<property name="driverClassName" value="${batch.jdbc.driver}" />
|
||||
<property name="url" value="${batch.jdbc.url}" />
|
||||
<property name="username" value="${batch.jdbc.user}" />
|
||||
|
||||
Reference in New Issue
Block a user