Announcement Announcement Module
Collapse
No announcement yet.
Having problem to do a clean build Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Having problem to do a clean build

    Hi,

    I am currently using MyEclipse 5.0 with JDK 1.5 as IDE and having problem even to get started with the downloaded org.springframework.batch-2.0.0.RELEASE-with-dependencies.zip using the version without Maven to do a clean build. I created a Java project in my workspace and imported the unzipped version of the above download. To begin with having problem to clearly follow Spring Batch build instruction -
    Code:
    With Eclipse and without Maven
    Similar instructions would apply to other IDEs.
    
    Download the "with-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. 
    Force the workspace to build (e.g. Project -> Clean...) 
    Run the unit tests in your project under src/test/java. N.B. the FootbalJobFunctionTests takes quite a long time to run.
    Imported the "sample" folder and added the jars from the dist folder in the Build Path. But still can't get a clean build. But I was able to do all that in my personal laptop where I use Ganymede Eclipse where I didn't have any problem at all. Tried all other crazy ways to do a clean build. Not working for me yet. I think I need some sort of hand-hold sort of instruction.
    Would really appreciate if could get some tips on this trivial problem I am facing.

    Thanks

  • #2
    The instructions you quoted say "import the org.springframework.batch.samples project from the samples directory". Nothing about creating a new project and importing the zip contents. Use File->Import->General->Existing Projects->Browse... to locate the samples. Or do the same as you did with vanilla Ganymede. Or ask someone who knows about MyEclipse. Or use STS (it's free).

    Comment


    • #3
      Thanks Dave I'll try the STS. One separate question about setting up Oracle
      as the datasource. It appears even all the places where we have the data-source-context.xml with this -

      Code:
      <bean id="environment"
      		class="org.springframework.batch.support.SystemPropertyInitializer">
      		<property name="defaultValue" value="oracle"/>
      	</bean>
      We are seeing in debug mode that datasource is getting set to hsql. Even if rename the file say to - data1-source-context.xml don't know for sure like it is getting reset to hsql while doing a JUnit run. Not sure if I have explained my problem clearly. By the way I don't have Maven setup.

      Any idea what am I doing wrong?

      Comment


      • #4
        Getting reds on codes. I suppose I do not need to add any new jars? Everything I need should be in the distribution. One question though what is this org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER?

        Comment


        • #5
          It's the classpath container for m2eclipse (the Maven intergration plugin). If you don't wan to use that just remove it. Or download STS from http://www.springsource.com/products/sts and use that (it comes with all the plugins you need).

          Comment


          • #6
            Dave,

            Thanks for your response. At last I was able to get a clean build in my MyEcilpse 5.0 IDE by removing this org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER stuff out from the build-path. So, looks like for this with dependencies version of Spring Batch 2.0.0.RELEASE this jar file needs to be taken out?

            Much appreciate for all the help.

            Comment

            Working...
            X