BATCH-2229 & BATCH-2218: Removed OSGi related metadata and Maven POMs
This commit is contained in:
@@ -839,7 +839,7 @@ source view of the configuration is as follows:
|
||||
|
||||
<bean id="directory"
|
||||
class="org.springframework.core.io.FileSystemResource">
|
||||
<constructor-arg value="target/test-outputs/test-dir" />
|
||||
<constructor-arg value="build/test-outputs/test-dir" />
|
||||
</bean>
|
||||
|
||||
For simplicity we are only displaying the job configuration itself
|
||||
|
||||
@@ -1,421 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>spring-batch-samples</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>Samples</name>
|
||||
<url>http://docs.spring.io/spring-batch/${artifactId}</url>
|
||||
<description>Example batch jobs using Spring Batch Core and Execution.</description>
|
||||
<parent>
|
||||
<groupId>org.springframework.batch</groupId>
|
||||
<artifactId>spring-batch-parent</artifactId>
|
||||
<version>3.0.0.BUILD-SNAPSHOT</version>
|
||||
<relativePath>../spring-batch-parent</relativePath>
|
||||
</parent>
|
||||
<scm>
|
||||
<url>https://github.com/spring-projects/spring-batch</url>
|
||||
<connection>scm:git:git://github.com/spring-projects/spring-batch.git</connection>
|
||||
<developerConnection>scm:git:git://github.com/spring-projects/spring-batch.git</developerConnection>
|
||||
<tag>HEAD</tag>
|
||||
</scm>
|
||||
<properties>
|
||||
<!-- Override this with -Denvironment=XXXX to change database type -->
|
||||
<environment>hsql</environment>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.vmware.sqlfire</groupId>
|
||||
<artifactId>sqlfireclient</artifactId>
|
||||
<optional>true</optional>
|
||||
<version>1.0.3</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.batch</groupId>
|
||||
<artifactId>spring-batch-core</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.batch</groupId>
|
||||
<artifactId>spring-batch-test</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjrt</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.quartz-scheduler</groupId>
|
||||
<artifactId>quartz</artifactId>
|
||||
<version>2.2.1</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.29</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>net.sourceforge.jtds</groupId>
|
||||
<artifactId>jtds</artifactId>
|
||||
<version>1.2.4</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-dbcp</groupId>
|
||||
<artifactId>commons-dbcp</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-pool</groupId>
|
||||
<artifactId>commons-pool</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
<artifactId>xstream</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.woodstox</groupId>
|
||||
<artifactId>woodstox-core-asl</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>xmlunit</groupId>
|
||||
<artifactId>xmlunit</artifactId>
|
||||
<version>1.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-log4j12</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>log4j</groupId>
|
||||
<artifactId>log4j</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy</artifactId>
|
||||
<version>2.2.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-ant</artifactId>
|
||||
<version>2.2.2</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-entitymanager</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-annotations</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.geronimo.specs</groupId>
|
||||
<artifactId>geronimo-jta_1.1_spec</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>cglib</groupId>
|
||||
<artifactId>cglib-nodep</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.ibatis</groupId>
|
||||
<artifactId>ibatis-sqlmap</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.derby</groupId>
|
||||
<artifactId>derby</artifactId>
|
||||
<optional>true</optional>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
<version>9.0-801.jdbc4</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-aop</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-oxm</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-core</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-context-support</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-jdbc</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-orm</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-test</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-tx</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-web</artifactId>
|
||||
<optional>true</optional>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-commons</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.data</groupId>
|
||||
<artifactId>spring-data-jpa</artifactId>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.mail</groupId>
|
||||
<artifactId>mail</artifactId>
|
||||
<version>1.4.7</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-amqp</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.amqp</groupId>
|
||||
<artifactId>spring-rabbit</artifactId>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mockito</groupId>
|
||||
<artifactId>mockito-all</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>javax.inject</groupId>
|
||||
<artifactId>javax.inject</artifactId>
|
||||
<version>1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
<name>ENVIRONMENT</name>
|
||||
<value>${environment}</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-antrun-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>generate-sql</id>
|
||||
<phase>generate-sources</phase>
|
||||
<configuration>
|
||||
<tasks>
|
||||
<typedef resource="foundrylogic/vpp/typedef.properties" />
|
||||
<taskdef resource="foundrylogic/vpp/taskdef.properties" />
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/hsqldb.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/hsqldb.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-hsqldb.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/h2.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/h2.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-h2.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/db2.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/db2.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-db2.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/derby.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/derby.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-derby.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/oracle10g.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/oracle10g.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-oracle10g.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/postgresql.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/postgresql.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-postgresql.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/mysql.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/mysql.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-mysql.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/sqlserver.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/sqlserver.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-sqlserver.sql" />
|
||||
</vppcopy>
|
||||
<vppcopy todir="${basedir}/target/generated-resources" overwrite="true">
|
||||
<config>
|
||||
<context>
|
||||
<property key="includes" value="src/main/sql" />
|
||||
<property file="${basedir}/src/main/sql/sybase.properties" />
|
||||
</context>
|
||||
<engine>
|
||||
<property key="velocimacro.library" value="src/main/sql/sybase.vpp" />
|
||||
</engine>
|
||||
</config>
|
||||
<fileset dir="${basedir}/src/main/sql" includes="business-schema.sql.vpp" />
|
||||
<mapper type="glob" from="*.sql.vpp" to="*-sybase.sql" />
|
||||
</vppcopy>
|
||||
</tasks>
|
||||
</configuration>
|
||||
<goals>
|
||||
<goal>run</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<junitArtifactName>junit:junit</junitArtifactName>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>gemstone</id>
|
||||
<name>Release bundles for SQLFire and GemFire</name>
|
||||
<url>http://dist.gemstone.com.s3.amazonaws.com/maven/release</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>libs-milestone</id>
|
||||
<url>http://repo.spring.io/libs-milestone</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>plugins-release</id>
|
||||
<url>http://repo.spring.io/plugins-release</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
</project>
|
||||
@@ -30,7 +30,7 @@ public class OutputFileListener {
|
||||
|
||||
private String inputKeyName = "fileName";
|
||||
|
||||
private String path = "file:./target/output/";
|
||||
private String path = "file:./build/output/";
|
||||
|
||||
public void setPath(String path) {
|
||||
this.path = path;
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.batch.item.ItemReader;
|
||||
* {@link ItemReader} that can identify the record boundaries. The custom reader
|
||||
* should mark the beginning and end of records by returning an
|
||||
* {@link AggregateItem} which responds true to its query methods
|
||||
* <code>is*()</code>.<br/><br/>
|
||||
* <code>is*()</code>.<br><br>
|
||||
*
|
||||
* This class is thread-safe (it can be used concurrently by multiple threads)
|
||||
* as long as the {@link ItemReader} is also thread-safe.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Placeholders batch.*
|
||||
# for H2:
|
||||
batch.jdbc.driver=org.h2.Driver
|
||||
batch.jdbc.url=jdbc:h2:file:target/data/h2
|
||||
batch.jdbc.url=jdbc:h2:file:build/data/h2
|
||||
batch.jdbc.user=sa
|
||||
batch.jdbc.password=
|
||||
batch.jdbc.testWhileIdle=false
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
|
||||
<bean id="fileItemWriter1" class="org.springframework.batch.item.file.FlatFileItemWriter">
|
||||
<property name="name" value="fw1" />
|
||||
<property name="resource" value="file:target/test-outputs/CustomerReport1.txt" />
|
||||
<property name="resource" value="file:build/test-outputs/CustomerReport1.txt" />
|
||||
<property name="lineAggregator">
|
||||
<bean class="org.springframework.batch.item.file.transform.PassThroughLineAggregator" />
|
||||
</property>
|
||||
@@ -82,7 +82,7 @@
|
||||
|
||||
<bean id="fileItemWriter2" class="org.springframework.batch.item.file.FlatFileItemWriter">
|
||||
<property name="name" value="fw2" />
|
||||
<property name="resource" value="file:target/test-outputs/CustomerReport2.txt" />
|
||||
<property name="resource" value="file:build/test-outputs/CustomerReport2.txt" />
|
||||
<property name="lineAggregator">
|
||||
<bean class="org.springframework.batch.item.file.transform.PassThroughLineAggregator" />
|
||||
</property>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
void execute() {
|
||||
def ant = new AntBuilder()
|
||||
ant.unzip(src:"src/main/resources/data/groovyJob/input/files.zip",
|
||||
dest:"target/groovyJob/staging")
|
||||
dest:"build/groovyJob/staging")
|
||||
}
|
||||
}
|
||||
</lang:inline-script>
|
||||
@@ -46,9 +46,9 @@
|
||||
class ZipTasklet {
|
||||
void execute() {
|
||||
def ant = new AntBuilder()
|
||||
ant.mkdir(dir:"target/groovyJob/output")
|
||||
ant.zip(destfile:"target/groovyJob/output/files.zip",
|
||||
basedir:"target/groovyJob/staging", includes:"**")
|
||||
ant.mkdir(dir:"build/groovyJob/output")
|
||||
ant.zip(destfile:"build/groovyJob/output/files.zip",
|
||||
basedir:"build/groovyJob/staging", includes:"**")
|
||||
}
|
||||
}
|
||||
</lang:inline-script>
|
||||
|
||||
@@ -61,6 +61,6 @@
|
||||
</bean>
|
||||
<bean id="outputResource" class="org.springframework.core.io.FileSystemResource">
|
||||
<constructor-arg type="java.lang.String"
|
||||
value="target/test-outputs/headerFooterOutput.txt" />
|
||||
value="build/test-outputs/headerFooterOutput.txt" />
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -35,7 +35,7 @@
|
||||
<bean id="itemWriter" class="org.springframework.batch.sample.iosample.internal.MultiLineTradeItemWriter">
|
||||
<property name="delegate">
|
||||
<bean class="org.springframework.batch.item.file.FlatFileItemWriter">
|
||||
<property name="resource" value="file:target/test-outputs/multiLineOutput.txt" />
|
||||
<property name="resource" value="file:build/test-outputs/multiLineOutput.txt" />
|
||||
<property name="lineAggregator">
|
||||
<bean class="org.springframework.batch.item.file.transform.PassThroughLineAggregator" />
|
||||
</property>
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
|
||||
|
||||
<bean id="itemWriter" class="org.springframework.batch.item.file.FlatFileItemWriter">
|
||||
<property name="resource" value="file:target/test-outputs/multiRecordTypeOutput.txt" />
|
||||
<property name="resource" value="file:build/test-outputs/multiRecordTypeOutput.txt" />
|
||||
<property name="lineAggregator">
|
||||
<bean class="org.springframework.batch.sample.iosample.internal.DelegatingTradeLineAggregator">
|
||||
<property name="tradeLineAggregator" ref="tradeLineAggregator" />
|
||||
|
||||
@@ -31,6 +31,6 @@
|
||||
</bean>
|
||||
|
||||
<bean id="outputResource" class="org.springframework.core.io.FileSystemResource">
|
||||
<constructor-arg value="target/test-outputs/output.xml" />
|
||||
<constructor-arg value="build/test-outputs/output.xml" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<bean id="writer" class="org.springframework.batch.item.file.FlatFileItemWriter">
|
||||
<property name="resource"
|
||||
value="file:target/test-outputs/20070122.testStream.multilineStep.txt" />
|
||||
value="file:build/test-outputs/20070122.testStream.multilineStep.txt" />
|
||||
<property name="lineAggregator">
|
||||
<bean
|
||||
class="org.springframework.batch.item.file.transform.PassThroughLineAggregator" />
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="fileItemWriter" class="org.springframework.batch.item.file.FlatFileItemWriter">
|
||||
<property name="resource" value="file:target/test-outputs/multilineOrderOutput.txt" />
|
||||
<property name="resource" value="file:build/test-outputs/multilineOrderOutput.txt" />
|
||||
<property name="lineAggregator">
|
||||
<bean class="org.springframework.batch.sample.domain.order.internal.OrderLineAggregator">
|
||||
<property name="aggregators" ref="outputAggregators"/>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</step>
|
||||
|
||||
<bean id="fileNameListener" class="org.springframework.batch.sample.common.OutputFileListener" scope="step">
|
||||
<property name="path" value="file:./target/output/file/" />
|
||||
<property name="path" value="file:./build/output/file/" />
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="outputTestReader" class="org.springframework.batch.item.file.MultiResourceItemReader" scope="prototype">
|
||||
<property name="resources" value="file:target/output/file/delimited*.csv" />
|
||||
<property name="resources" value="file:build/output/file/delimited*.csv" />
|
||||
<property name="delegate" ref="testItemReader" />
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</step>
|
||||
|
||||
<bean id="fileNameListener" class="org.springframework.batch.sample.common.OutputFileListener" scope="step">
|
||||
<property name="path" value="file:./target/output/jdbc/" />
|
||||
<property name="path" value="file:./build/output/jdbc/" />
|
||||
</bean>
|
||||
|
||||
<bean id="itemReader" scope="step" autowire-candidate="false" class="org.springframework.batch.item.database.JdbcPagingItemReader">
|
||||
@@ -60,7 +60,7 @@
|
||||
</bean>
|
||||
|
||||
<bean id="outputTestReader" class="org.springframework.batch.item.file.MultiResourceItemReader" scope="prototype">
|
||||
<property name="resources" value="file:target/output/jdbc/*.csv" />
|
||||
<property name="resources" value="file:build/output/jdbc/*.csv" />
|
||||
<property name="delegate" ref="testItemReader" />
|
||||
</bean>
|
||||
|
||||
|
||||
@@ -61,6 +61,6 @@
|
||||
</bean>
|
||||
|
||||
<bean id="outputResource" class="org.springframework.core.io.FileSystemResource">
|
||||
<constructor-arg value="target/test-outputs/restartFileOutput.csv" />
|
||||
<constructor-arg value="build/test-outputs/restartFileOutput.csv" />
|
||||
</bean>
|
||||
</beans>
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
<bean id="customerReportItemWriter" class="org.springframework.batch.sample.domain.trade.internal.FlatFileCustomerCreditDao">
|
||||
<property name="itemWriter">
|
||||
<bean class="org.springframework.batch.item.file.FlatFileItemWriter">
|
||||
<property name="resource" value="file:target/test-outputs/20070122.testStream.CustomerReportStep.TEMP.txt" />
|
||||
<property name="resource" value="file:build/test-outputs/20070122.testStream.CustomerReportStep.TEMP.txt" />
|
||||
<property name="lineAggregator">
|
||||
<bean class="org.springframework.batch.item.file.transform.PassThroughLineAggregator" />
|
||||
</property>
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||
<project name="Spring Batch: ${project.name}">
|
||||
|
||||
<body>
|
||||
|
||||
<links>
|
||||
<item name="${project.name}" href="index.html"/>
|
||||
</links>
|
||||
|
||||
<menu name="Reference Material">
|
||||
<item name="${project.name}" href="index.html"/>
|
||||
</menu>
|
||||
|
||||
<menu ref="reports"/>
|
||||
|
||||
</body>
|
||||
|
||||
</project>
|
||||
@@ -66,8 +66,8 @@ public class CompositeItemWriterSampleFunctionalTests {
|
||||
|
||||
jobLauncherTestUtils.launchJob();
|
||||
|
||||
checkOutputFile("target/test-outputs/CustomerReport1.txt");
|
||||
checkOutputFile("target/test-outputs/CustomerReport2.txt");
|
||||
checkOutputFile("build/test-outputs/CustomerReport1.txt");
|
||||
checkOutputFile("build/test-outputs/CustomerReport2.txt");
|
||||
checkOutputTable(before);
|
||||
}
|
||||
|
||||
|
||||
@@ -41,14 +41,14 @@ public class GroovyJobFunctionalTests {
|
||||
|
||||
@Before
|
||||
public void removeOldData() throws IOException {
|
||||
FileUtils.deleteDirectory(new File("target/groovyJob"));
|
||||
FileUtils.deleteDirectory(new File("build/groovyJob"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLaunchJob() throws Exception {
|
||||
assertFalse(new File("target/groovyJob/output/files.zip").exists());
|
||||
assertFalse(new File("build/groovyJob/output/files.zip").exists());
|
||||
jobLauncherTestUtils.launchJob();
|
||||
assertTrue(new File("target/groovyJob/output/files.zip").exists());
|
||||
assertTrue(new File("build/groovyJob/output/files.zip").exists());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class MultilineJobFunctionalTests {
|
||||
private static final String EXPECTED_RESULT = "[Trade: [isin=UK21341EAH45,quantity=978,price=98.34,customer=customer1], Trade: [isin=UK21341EAH46,quantity=112,price=18.12,customer=customer2]]"
|
||||
+ "[Trade: [isin=UK21341EAH47,quantity=245,price=12.78,customer=customer2], Trade: [isin=UK21341EAH48,quantity=108,price=9.25,customer=customer3], Trade: [isin=UK21341EAH49,quantity=854,price=23.39,customer=customer4]]";
|
||||
|
||||
private Resource output = new FileSystemResource("target/test-outputs/20070122.testStream.multilineStep.txt");
|
||||
private Resource output = new FileSystemResource("build/test-outputs/20070122.testStream.multilineStep.txt");
|
||||
|
||||
@Test
|
||||
public void testJobLaunch() throws Exception {
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
"/job-runner-context.xml" })
|
||||
public class MultilineOrderJobFunctionalTests {
|
||||
|
||||
private static final String ACTUAL = "target/test-outputs/multilineOrderOutput.txt";
|
||||
private static final String ACTUAL = "build/test-outputs/multilineOrderOutput.txt";
|
||||
private static final String EXPECTED = "data/multilineOrderJob/result/multilineOrderOutput.txt";
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -15,12 +15,12 @@
|
||||
*/
|
||||
package org.springframework.batch.sample.common;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.springframework.batch.core.JobExecution;
|
||||
import org.springframework.batch.core.StepExecution;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
public class OutputFileListenerTests {
|
||||
private OutputFileListener listener = new OutputFileListener();
|
||||
private StepExecution stepExecution = new StepExecution("foo", new JobExecution(0L), 1L);
|
||||
@@ -28,7 +28,7 @@ public class OutputFileListenerTests {
|
||||
@Test
|
||||
public void testCreateOutputNameFromInput() {
|
||||
listener.createOutputNameFromInput(stepExecution);
|
||||
assertEquals("{outputFile=file:./target/output/foo.csv}", stepExecution.getExecutionContext().toString());
|
||||
assertEquals("{outputFile=file:./build/output/foo.csv}", stepExecution.getExecutionContext().toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -39,7 +39,7 @@ public class DelimitedFunctionalTests extends AbstractIoSampleTests {
|
||||
@Override
|
||||
protected void pointReaderToOutput(ItemReader<CustomerCredit> reader) {
|
||||
JobParameters jobParameters = new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile",
|
||||
"file:./target/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
"file:./build/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters);
|
||||
StepSynchronizationManager.close();
|
||||
StepSynchronizationManager.register(stepExecution);
|
||||
@@ -49,7 +49,7 @@ public class DelimitedFunctionalTests extends AbstractIoSampleTests {
|
||||
protected JobParameters getUniqueJobParameters() {
|
||||
return new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile",
|
||||
"data/iosample/input/delimited.csv").addString("outputFile",
|
||||
"file:./target/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
"file:./build/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public class FixedLengthFunctionalTests extends AbstractIoSampleTests {
|
||||
@Override
|
||||
protected void pointReaderToOutput(ItemReader<CustomerCredit> reader) {
|
||||
JobParameters jobParameters = new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile",
|
||||
"file:./target/test-outputs/fixedLengthOutput.txt").toJobParameters();
|
||||
"file:./build/test-outputs/fixedLengthOutput.txt").toJobParameters();
|
||||
StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters);
|
||||
StepSynchronizationManager.close();
|
||||
StepSynchronizationManager.register(stepExecution);
|
||||
@@ -44,7 +44,7 @@ public class FixedLengthFunctionalTests extends AbstractIoSampleTests {
|
||||
protected JobParameters getUniqueJobParameters() {
|
||||
return new JobParametersBuilder(super.getUniqueJobParameters()).addString("inputFile",
|
||||
"data/iosample/input/fixedLength.txt").addString("outputFile",
|
||||
"file:./target/test-outputs/fixedLengthOutput.txt").toJobParameters();
|
||||
"file:./build/test-outputs/fixedLengthOutput.txt").toJobParameters();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
"/job-runner-context.xml" })
|
||||
public class MultiLineFunctionalTests {
|
||||
|
||||
private static final String OUTPUT_FILE = "target/test-outputs/multiLineOutput.txt";
|
||||
private static final String OUTPUT_FILE = "build/test-outputs/multiLineOutput.txt";
|
||||
|
||||
private static final String INPUT_FILE = "src/main/resources/data/iosample/input/multiLine.txt";
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
"/job-runner-context.xml" })
|
||||
public class MultiRecordTypeFunctionalTests {
|
||||
|
||||
private static final String OUTPUT_FILE = "target/test-outputs/multiRecordTypeOutput.txt";
|
||||
private static final String OUTPUT_FILE = "build/test-outputs/multiRecordTypeOutput.txt";
|
||||
|
||||
private static final String INPUT_FILE = "src/main/resources/data/iosample/input/multiRecordType.txt";
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ public class MultiResourceFunctionalTests extends AbstractIoSampleTests {
|
||||
@Override
|
||||
protected void pointReaderToOutput(ItemReader<CustomerCredit> reader) {
|
||||
JobParameters jobParameters = new JobParametersBuilder(super.getUniqueJobParameters()).addString(
|
||||
"input.file.path", "file:target/test-outputs/multiResourceOutput.csv.*").toJobParameters();
|
||||
"input.file.path", "file:build/test-outputs/multiResourceOutput.csv.*").toJobParameters();
|
||||
StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters);
|
||||
StepSynchronizationManager.close();
|
||||
StepSynchronizationManager.register(stepExecution);
|
||||
@@ -48,7 +48,7 @@ public class MultiResourceFunctionalTests extends AbstractIoSampleTests {
|
||||
protected JobParameters getUniqueJobParameters() {
|
||||
JobParametersBuilder builder = new JobParametersBuilder(super.getUniqueJobParameters());
|
||||
return builder.addString("input.file.path", "classpath:data/iosample/input/delimited*.csv").addString(
|
||||
"output.file.path", "file:target/test-outputs/multiResourceOutput.csv").toJobParameters();
|
||||
"output.file.path", "file:build/test-outputs/multiResourceOutput.csv").toJobParameters();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public class TwoJobInstancesDelimitedFunctionalTests {
|
||||
|
||||
private void verifyOutput(int expected) throws Exception {
|
||||
JobParameters jobParameters = new JobParametersBuilder().addString("inputFile",
|
||||
"file:./target/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
"file:./build/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
StepExecution stepExecution = MetaDataInstanceFactory.createStepExecution(jobParameters);
|
||||
|
||||
int count = StepScopeTestUtils.doInStepScope(stepExecution, new Callable<Integer>() {
|
||||
@@ -101,6 +101,6 @@ public class TwoJobInstancesDelimitedFunctionalTests {
|
||||
|
||||
protected JobParameters getJobParameters(String fileName) {
|
||||
return new JobParametersBuilder().addLong("timestamp", new Date().getTime()).addString("inputFile", fileName)
|
||||
.addString("outputFile", "file:./target/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
.addString("outputFile", "file:./build/test-outputs/delimitedOutput.csv").toJobParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
Manifest-Version: 1.0
|
||||
Bundle-SymbolicName: org.springframework.batch.samples
|
||||
Bundle-Name: Spring Batch Samples
|
||||
Bundle-Vendor: Spring
|
||||
Bundle-Version: ${version}
|
||||
Bundle-ManifestVersion: 2
|
||||
Ignored-Existing-Headers:
|
||||
Import-Package,
|
||||
Export-Package
|
||||
Import-Template:
|
||||
*;version="0"
|
||||
Reference in New Issue
Block a user