-
Couldn't load subscription status.
- Fork 76
project setup
Overview for the project setup.
The pom.xml in the root directory contains just a simple parent pom wrapper project to provide a convenient "build all" feature, see Maven Pom project aggregation. Each individual project stands on its own and can be used as such, e.g. there are no maven configurations made in the parent pom.
The examples modules are:
- spring batch examples parent, the mentioned "build all" parent module
- complex, contains examples which use more than one of the core aspects of spring batch
- listeners
- playground, mostly for incubating new examples
- readers
- writers
For each project i added specific build configurations for the following build plugins:
-
maven-compiler-plugin
- JDK set to 1.6
- compiler.debug=true
- compiler.optimize=false
-
maven-resources-plugin
- forced UTF-8 encoding
-
maven-surefire-plugin
- set log4j properties file location
- set forkMode=always to run each test class isolated
Each project contains only the needed dependencies and i check regularly for version updates and the dependencies licenses.
The project follows the maven standard directory layout, only difference so far is a README.md (md for markdown format) and a LICENSE file instead of both files ending with .txt.
Overview:
src/main/resources/log4j/log4.properties
src/main/resources/spring/batch/job/the job.xml files
src/main/resources/spring/batch/setup/job-context.xml
src/main/resources/spring/batch/setup/job-database.xml
src/test/resources/input/ the used input files
src/test/resources/spring/batch/setup/test/job-test-context.xml
For each project:
- the log4j.properties is under
src/main/resources/log4j/log4j.properties- logging level is WARN for all and DEBUG for the source package of the project
- location might be changed soon to src/test...
- the Spring Batch infrastructure setup is under
src/main/resources/spring/batch/setup/...-
job-context.xmlcontains JobRepository, StepScope etc. beans -
job-database.xmlcontains the datasource and transactionmanager beans- HSQLDB in-memory variant is used
- Spring Batch Schema is loaded at Application Context startup with jdbc:initialize-database
-
- the Spring Batch test infrastructure setup is under
src/test/resources/spring/batch/setup/test/...-
job-test-context.xmlcontains just the JobLauncherTestUtils bean
-
- each example has its own package (test package has the same name), e.g.
simplelist- not all examples have java source, some have only a job.xml and some tests
- each example has its own job.xml, e.g.
simple-list-job.xml - each example has a large test coverage, well what can i say, i am addicted to tests :-)