project setup

langmi edited this page Oct 30, 2011 · 17 revisions

Overview for the project setup.

Maven Configuration

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

Specific Build Configurations

For each project i added specific build configurations for the following build plugins:


Each project contains only the needed dependencies and i check regularly for version updates and the dependencies licenses.

Directory Structure

The project follows the maven standard directory layout, only difference so far is a (md for markdown format) and a LICENSE file instead of both files ending with .txt.

Important /resources Directories and Files


src/main/resources/spring/batch/job/the job.xml files

src/test/resources/input/ the used input files    

For each project:

  • the is under src/main/resources/log4j/
    • 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.xml contains JobRepository, StepScope etc. beans
    • job-database.xml contains the datasource and transactionmanager beans
  • the Spring Batch test infrastructure setup is under src/test/resources/spring/batch/setup/test/...

Code Structure

  • 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 :-)