update getting started guide
This commit is contained in:
@@ -9,15 +9,27 @@ Spring Batch Getting Started
|
||||
|
||||
A convenient way to get started quickly with Spring Batch is to run the samples which are packaged in the samples module. There is also a simple command line sample (or "archetype") which has a bare bones but complete implementation of a simpel job. The source code for the samples (and the other modules) is available either from the {{{downloads.html}.Zip assembly}} or from {{{source-repository.html}Subversion}}.
|
||||
|
||||
* Using SpringSource Tool Suite (STS)
|
||||
|
||||
This is the quickest way to get started. It requires an internet connection for download, and access to a Maven repository (remote or local).
|
||||
|
||||
* Download STS version 2.1.0.* from the {{{http://www.springsource.com/products/sts}SpringSource website}}. STS is a free Eclipse bundle with many features useful for Spring devcelopers.
|
||||
|
||||
* Go to {{New->Other...}} and select {{SpringSource Tool Suite->Template Project}} from the wizard chooser.
|
||||
|
||||
* The wizard has a drop down with a list of template projects. One of them is a "Simple Spring Batch Project". Select it and follow the wizard.
|
||||
|
||||
* A project is created with all dependencies and a simple input/output job configuration. It can be run using a unit test, or on the command line (see instructions in the pom.xml).
|
||||
|
||||
* Using the .Zip Distribution
|
||||
|
||||
** With Maven and Eclipse
|
||||
|
||||
* Download the "no-dependencies" version of the distribution and unzip to create a directory <<<org.springframework.batch-<versionId>>>>.
|
||||
|
||||
* Get the Q4E Eclipse-plugin
|
||||
(http://q4e.googlecode.com/svn/trunk/updatesite). If you can't or
|
||||
don't want to install this plugin, you can use the
|
||||
* Get the m2eclipse plugin (http://m2eclipse.sonatype.org/update)
|
||||
(installed in STS out of the box). If you can't or don't want to
|
||||
install this plugin, you can use the
|
||||
{{{http://maven.apache.org/plugins/maven-eclipse-plugin/}Maven
|
||||
Eclipse Plugin}} to create the classpath entries you need.
|
||||
|
||||
@@ -27,7 +39,7 @@ Spring Batch Getting Started
|
||||
|
||||
* The project should build cleanly without having to fix the dependencies. If it doesn't, make sure you are online, and maybe try building on the command line first to make sure all the dependencies are downloaded. See the {{{building.html}building instructions}} if you run into difficulty.
|
||||
|
||||
(N.B. the "archetype" is not a real Maven archetype, just a template project that can be used as a starting point for a self-contained batch job.)
|
||||
(N.B. the "archetype" is not a real Maven archetype, just a template project that can be used as a starting point for a self-contained batch job. It is the same project that can be imported into STS using the Project Template wizard.)
|
||||
|
||||
** With Maven on the Command Line
|
||||
|
||||
@@ -45,13 +57,13 @@ $ mvn test
|
||||
|
||||
Similar instructions would apply to other IDEs.
|
||||
|
||||
* Download the "with-dependencies" package and unzip to create a directory <<<spring-batch-<versionId>>>>.
|
||||
* Download the "no-dependencies" package and unzip to create a directory <<<spring-batch-<versionId>>>>.
|
||||
|
||||
* Open Eclipse and make a workspace in the directory you just created.
|
||||
|
||||
* Import the <<<org.springframework.batch.samples>>> project from the samples directory.
|
||||
|
||||
* Add all the jar files in the distribution as library dependencies (except <<<spring-batch-samples-<versionId>.jar>>>). There are jars in <<<samples/lib>>>, <<<sources>>> and in <<<sources/lib>>>, including some duplicates.
|
||||
* Find all the compile scope and non-optional runtime jar files listed in the {{dependencies.html}dependencies report}} and import them into the project.
|
||||
|
||||
* Force the workspace to build (e.g. Project -> Clean...)
|
||||
|
||||
@@ -66,34 +78,3 @@ $ mvn test
|
||||
* Check out the Spring Batch project from Subversion (instructions are available {{{source-repository.html}here}}).
|
||||
|
||||
* Run Maven from the command line in the samples directory. There are additional building instructions and suggestions about what to do if it goes wrong {{{building.html}here}}.
|
||||
|
||||
The Original 1.0-{m3} Distribution
|
||||
|
||||
The original "1.0-m3" release had some issues like missing dependencies, so if you are using that either get the newer release, or see below. (The m3a release is just an update of the .Zip packages - there is no corresponding update of the jar files, which did not change.)
|
||||
|
||||
If you are using not using Maven you will need some dependencies that were missing from the distro, so get these jar files from somewhere else:
|
||||
|
||||
* Servlet API (2.3 or better)
|
||||
|
||||
* spring-test-2.5.jar
|
||||
|
||||
* spring-web-2.5.jar
|
||||
|
||||
* easymock.jar (1.1 or 1.2)
|
||||
|
||||
* commons-io (1.3.1)
|
||||
|
||||
* xmlunit (1.1)
|
||||
|
||||
* aspectjweaver (1.5.3)
|
||||
|
||||
* hsqldb (1.8.0.7)
|
||||
|
||||
If you are using Maven get the parent project pom by downloading it from Subversion (export from {{{https://src.springframework.org/svn/spring-batch/tags/spring-batch-1.0.0.m3/parent}here}}):
|
||||
|
||||
+---
|
||||
$ cd samples
|
||||
$ svn export https://src.springframework.org/svn/spring-batch/tags/spring-batch-1.0.0.m3/parent parent
|
||||
+---
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user