From 8c55fcf8b18a3ec97523da7a8e063b2521f28f08 Mon Sep 17 00:00:00 2001 From: dsyer Date: Mon, 29 Mar 2010 11:47:19 +0000 Subject: [PATCH] Fix broken build? --- spring-batch-samples/.springBeans | 3 +- .../datasource/DataSourceInitializer.java | 4 +- .../DerbyDataSourceFactoryBean.java | 37 ------------------- .../resources/alt-data-source-context.xml | 26 ------------- .../src/main/resources/alt.properties | 4 -- .../src/main/resources/batch-hsql.properties | 1 + .../src/main/resources/log4j.properties | 2 +- .../batch/sample/TestSuite.java | 33 +++++++++++++++++ 8 files changed, 38 insertions(+), 72 deletions(-) delete mode 100644 spring-batch-samples/src/main/java/test/jdbc/datasource/DerbyDataSourceFactoryBean.java delete mode 100644 spring-batch-samples/src/main/resources/alt-data-source-context.xml delete mode 100644 spring-batch-samples/src/main/resources/alt.properties create mode 100644 spring-batch-samples/src/test/java/org/springframework/batch/sample/TestSuite.java diff --git a/spring-batch-samples/.springBeans b/spring-batch-samples/.springBeans index 3bd6aede5..291c24367 100644 --- a/spring-batch-samples/.springBeans +++ b/spring-batch-samples/.springBeans @@ -1,7 +1,7 @@ 1 - + @@ -21,7 +21,6 @@ src/main/resources/jobs/retrySample.xml src/main/resources/simple-job-launcher-context.xml src/main/resources/adhoc-job-launcher-context.xml - src/main/resources/alt-data-source-context.xml src/main/resources/quartz-job-launcher-context.xml src/main/resources/jobs/skipSampleJob.xml src/main/resources/jobs/multilineOrderInputTokenizers.xml diff --git a/spring-batch-samples/src/main/java/test/jdbc/datasource/DataSourceInitializer.java b/spring-batch-samples/src/main/java/test/jdbc/datasource/DataSourceInitializer.java index 5d4aad94c..237d98e8c 100644 --- a/spring-batch-samples/src/main/java/test/jdbc/datasource/DataSourceInitializer.java +++ b/spring-batch-samples/src/main/java/test/jdbc/datasource/DataSourceInitializer.java @@ -17,8 +17,8 @@ package test.jdbc.datasource; import java.io.IOException; -import java.util.List; import java.util.Arrays; +import java.util.List; import javax.sql.DataSource; @@ -50,7 +50,7 @@ public class DataSourceInitializer implements InitializingBean, DisposableBean { private Log logger = LogFactory.getLog(getClass()); - private static boolean initialized = false; + private boolean initialized = false; public void setInitialize(boolean initialize) { this.initialize = initialize; diff --git a/spring-batch-samples/src/main/java/test/jdbc/datasource/DerbyDataSourceFactoryBean.java b/spring-batch-samples/src/main/java/test/jdbc/datasource/DerbyDataSourceFactoryBean.java deleted file mode 100644 index edcc3c9da..000000000 --- a/spring-batch-samples/src/main/java/test/jdbc/datasource/DerbyDataSourceFactoryBean.java +++ /dev/null @@ -1,37 +0,0 @@ -package test.jdbc.datasource; - -import java.io.File; - -import javax.sql.DataSource; - -import org.apache.derby.jdbc.EmbeddedDataSource; -import org.springframework.beans.factory.config.AbstractFactoryBean; - -public class DerbyDataSourceFactoryBean extends AbstractFactoryBean { - - private String dataDirectory = "derby-home"; - - public void setDataDirectory(String dataDirectory) { - this.dataDirectory = dataDirectory; - } - - protected Object createInstance() throws Exception { - File directory = new File(dataDirectory); - System.setProperty("derby.system.home", directory.getCanonicalPath()); - System.setProperty("derby.storage.fileSyncTransactionLog", "true"); - System.setProperty("derby.storage.pageCacheSize", "100"); - - final EmbeddedDataSource ds = new EmbeddedDataSource(); - ds.setDatabaseName("derbydb"); - ds.setCreateDatabase("create"); - ds.getConnection().close(); - ds.setCreateDatabase(null); - - return ds; - } - - public Class getObjectType() { - return DataSource.class; - } - -} diff --git a/spring-batch-samples/src/main/resources/alt-data-source-context.xml b/spring-batch-samples/src/main/resources/alt-data-source-context.xml deleted file mode 100644 index c96b08d55..000000000 --- a/spring-batch-samples/src/main/resources/alt-data-source-context.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/spring-batch-samples/src/main/resources/alt.properties b/spring-batch-samples/src/main/resources/alt.properties deleted file mode 100644 index 026d13275..000000000 --- a/spring-batch-samples/src/main/resources/alt.properties +++ /dev/null @@ -1,4 +0,0 @@ -batch.schema.script=schema-derby.sql -batch.business.schema.script=business-schema-derby.sql -batch.database.incrementer.class=org.springframework.jdbc.support.incrementer.DerbyMaxValueIncrementer -batch.lob.handler.class=org.springframework.jdbc.support.lob.DefaultLobHandler diff --git a/spring-batch-samples/src/main/resources/batch-hsql.properties b/spring-batch-samples/src/main/resources/batch-hsql.properties index 87d2d3919..188d9edb4 100644 --- a/spring-batch-samples/src/main/resources/batch-hsql.properties +++ b/spring-batch-samples/src/main/resources/batch-hsql.properties @@ -9,6 +9,7 @@ batch.jdbc.user=sa batch.jdbc.password= batch.jdbc.testWhileIdle=false batch.jdbc.validationQuery= +batch.drop.script=classpath:/org/springframework/batch/core/schema-drop-hsqldb.sql batch.schema.script=classpath:/org/springframework/batch/core/schema-hsqldb.sql batch.business.schema.script=classpath:/business-schema-hsqldb.sql batch.data.source.init=true diff --git a/spring-batch-samples/src/main/resources/log4j.properties b/spring-batch-samples/src/main/resources/log4j.properties index 9e20bcd32..da440d039 100644 --- a/spring-batch-samples/src/main/resources/log4j.properties +++ b/spring-batch-samples/src/main/resources/log4j.properties @@ -29,5 +29,5 @@ log4j.appender.chainsaw.layout=org.apache.log4j.xml.XMLLayout ### debug your specific package or classes with the following example log4j.logger.org.springframework.jdbc=info -log4j.logger.org.springframework.batch=info +log4j.logger.org.springframework.batch=debug log4j.logger.org.springframework.batch.sample=debug diff --git a/spring-batch-samples/src/test/java/org/springframework/batch/sample/TestSuite.java b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TestSuite.java new file mode 100644 index 000000000..660da4083 --- /dev/null +++ b/spring-batch-samples/src/test/java/org/springframework/batch/sample/TestSuite.java @@ -0,0 +1,33 @@ +/* + * Copyright 2006-2009 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.batch.sample; + +import org.junit.Ignore; +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +/** + * Temporary test suite to find bug in build.... + * + */ +@Ignore +@RunWith(Suite.class) +@SuiteClasses({SkipSampleFunctionalTests.class, CustomerFilterJobFunctionalTests.class}) +public class TestSuite { + +}