Announcement Announcement Module
Collapse
No announcement yet.
spring-batch hello world Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • spring-batch hello world

    Hi,

    thanks one more time for your patience.

    I suppose Maven is a wonderful tool once you have a clue what you're doing, but I'm slowly getting there.

    So after many many tries I finally created an empty maven project within eclipse added the repository you mentioned and added the dependency to batch-execution and everything seems to be shiny .

    Uff!

    Now within the next week or so I hope to be able to do my first spring-batch hello world. Any tip for me

    a) how to get maven to attach the sources, the jars seem to be there
    b) how to get started with a hello world?

    GŁnther

  • #2
    Originally posted by guenni View Post
    a) how to get maven to attach the sources, the jars seem to be there
    If you are using Eclipse get the Maven plugin (I think you said you already have it). In Windows->Preferences->Maven check the "download sources" box. I think that's what it is called (from memory).

    Originally posted by guenni View Post
    b) how to get started with a hello world?
    Use one of the samples as a starting point? The User Guide is a bit behind the curve but they are quite self-explanatory. Mostly they use JUnit as a launcher, but there is also an Eclipse launcher called jobLauncher.launch in teh root of the samples project, which uses the BatchCommandLineLauncher to run a sample job. If you use the default Eclipse project names (same as directory names) in your workspace, it should show up in your "Run Dialogue...".

    Comment


    • #3
      Originally posted by Dave Syer View Post
      If you are using Eclipse get the Maven plugin (I think you said you already have it). In Windows->Preferences->Maven check the "download sources" box. I think that's what it is called (from memory).
      For various reasons I am in the position of not being able to use Maven to check out and build Spring Batch.

      I would therefore just like to download pre-built jars and go from there.

      I have obtained the following from here http://s3browse.com/explore/maven.sp...ramework/batch

      spring-batch-core-1.0-m2-20070822.073953-4.jar
      spring-batch-core-1.0-m2-20070822.073953-4-sources.jar
      spring-batch-execution-1.0-m2-20070822.073953-4.jar
      spring-batch-infrastructure-1.0-m2-20070822.073953-4.jar
      spring-batch-integration-1.0-m2-20070822.073953-4.jar
      spring-batch-samples-1.0-m2-20070822.073953-4.jar
      spring-batch-samples-1.0-m2-20070822.073953-4-sources.jar

      But I cannot find any test cases to run the samples, nor the class AbstractLifecycleSpringContextTests in any of the above jar files.

      Is there a jar I am missing ?

      Comment


      • #4
        Because JUnit is used to run all the sample jobs, they are located in src/test/java, which won't be added to any jars maven creates. You mentioned that you can't use maven to build, can you still use subversion to check the code out? If so, and you absolutely can't use maven, you could then construct the dependencies of the project using the pom files by manually downloading and adding them to the classpath. Even if you use the created jars, you'll still need to do this step anyway if you can't use maven to download them for you.

        Comment


        • #5
          Hello world

          can u provide a simple application for beginers to understand without using DAO or any other components.The sample application provided(containing examples of football job and order job) is difficult to interpret.

          Comment


          • #6
            What about adhocLoopJob.xml or simpleTaskletJob.xml? It doesn't get much simpler. How do you expect a job to do anything without a data access layer? N.B. we recommend using the ItemProviderProcessorTasklet (or subclasses).

            Comment

            Working...
            X