Announcement Announcement Module
Collapse
No announcement yet.
Failing to build samples Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Failing to build samples

    Hi,

    I'm using Oracle Linux 6, and can't build the spring-batch samples. I have a pretty clean environment on this system, not much installed other than the Java JDK (version 1.6.0_26) and Maven (version 2.2.1).

    Here's what I did:

    Code:
    $ git clone git://github.com/SpringSource/spring-batch.git
    $ cd spring-batch/spring-batch-samples
    $ mvn test -P bootstrap
    I get the following output after mvn test -P bootstrap:

    Code:
    [INFO] Scanning for projects...
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Samples
    [INFO]    task-segment: [test]
    [INFO] ------------------------------------------------------------------------
    Downloading: http://people.apache.org/maven-snapshot-repository//org/springframework/batch/spring-batch-core/2.2.0.BUILD-SNAPSHOT/spring-batch-core-2.2.0.BUILD-SNAPSHOT.pom
    [INFO] Unable to find resource 'org.springframework.batch:spring-batch-core:pom:2.2.0.BUILD-SNAPSHOT' in repository apache-snapshot (http://people.apache.org/maven-snapshot-repository/)
    Downloading: http://people.apache.org/maven-snapshot-repository//org/springframework/batch/spring-batch-test/2.2.0.BUILD-SNAPSHOT/spring-batch-test-2.2.0.BUILD-SNAPSHOT.pom
    [INFO] Unable to find resource 'org.springframework.batch:spring-batch-test:pom:2.2.0.BUILD-SNAPSHOT' in repository apache-snapshot (http://people.apache.org/maven-snapshot-repository/)
    Downloading: http://people.apache.org/maven-snapshot-repository//org/springframework/batch/spring-batch-core/2.2.0.BUILD-SNAPSHOT/spring-batch-core-2.2.0.BUILD-SNAPSHOT.jar
    [INFO] Unable to find resource 'org.springframework.batch:spring-batch-core:jar:2.2.0.BUILD-SNAPSHOT' in repository apache-snapshot (http://people.apache.org/maven-snapshot-repository/)
    Downloading: http://people.apache.org/maven-snapshot-repository//org/springframework/batch/spring-batch-test/2.2.0.BUILD-SNAPSHOT/spring-batch-test-2.2.0.BUILD-SNAPSHOT.jar
    [INFO] Unable to find resource 'org.springframework.batch:spring-batch-test:jar:2.2.0.BUILD-SNAPSHOT' in repository apache-snapshot (http://people.apache.org/maven-snapshot-repository/)
    [INFO] ------------------------------------------------------------------------
    [ERROR] BUILD ERROR
    [INFO] ------------------------------------------------------------------------
    [INFO] Failed to resolve artifact.
    
    Missing:
    ----------
    1) org.springframework.batch:spring-batch-core:jar:2.2.0.BUILD-SNAPSHOT
    
      Try downloading the file manually from the project website.
    
      Then, install it using the command:
          mvn install:install-file -DgroupId=org.springframework.batch -DartifactId=spring-batch-core -Dversion=2.2.0.BUILD-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
    
      Alternatively, if you host your own repository you can deploy the file there:
          mvn deploy:deploy-file -DgroupId=org.springframework.batch -DartifactId=spring-batch-core -Dversion=2.2.0.BUILD-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    
      Path to dependency:
            1) org.springframework.batch:spring-batch-samples:jar:2.2.0.BUILD-SNAPSHOT
            2) org.springframework.batch:spring-batch-core:jar:2.2.0.BUILD-SNAPSHOT
    
    2) org.springframework.batch:spring-batch-test:jar:2.2.0.BUILD-SNAPSHOT
    
      Try downloading the file manually from the project website.
    
      Then, install it using the command:
          mvn install:install-file -DgroupId=org.springframework.batch -DartifactId=spring-batch-test -Dversion=2.2.0.BUILD-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file
    
      Alternatively, if you host your own repository you can deploy the file there:
          mvn deploy:deploy-file -DgroupId=org.springframework.batch -DartifactId=spring-batch-test -Dversion=2.2.0.BUILD-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    
      Path to dependency:
            1) org.springframework.batch:spring-batch-samples:jar:2.2.0.BUILD-SNAPSHOT
            2) org.springframework.batch:spring-batch-test:jar:2.2.0.BUILD-SNAPSHOT
    
    ----------
    2 required artifacts are missing.
    
    for artifact:
      org.springframework.batch:spring-batch-samples:jar:2.2.0.BUILD-SNAPSHOT
    
    from the specified remote repositories:
      com.springsource.repository.bundles.external (http://repository.springsource.com/maven/bundles/external),
      central (http://repo1.maven.org/maven2),
      apache-snapshot (http://people.apache.org/maven-snapshot-repository/),
      objectstyle (http://objectstyle.org/maven2/)
    
    
    
    [INFO] ------------------------------------------------------------------------
    [INFO] For more information, run Maven with the -e switch
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 4 seconds
    [INFO] Finished at: Fri Jun 17 12:53:22 EDT 2011
    [INFO] Final Memory: 9M/22M
    [INFO] ------------------------------------------------------------------------
    Any ideas on what's going on here?

    P.S. I can't get mvn install to work either (it fails with a "Failed to resolve artifact" for foundrylogic.vpp:vpp:jar:2.2.1). Can't get anything to build, period. Starting to become an annoyance.
    Last edited by notfed; Jun 17th, 2011, 05:01 PM.

  • #2
    I should add that I finally got this to work using spring-batch-2.1.8-RELEASE (I had been using the wrong [3.0.3] version of Maven). But not with the latest github repo (the last commit that works is 86a044bc6c9c5f674ac7, the 2.1.8-RELEASE commit).

    Comment


    • #3
      You don't have the snapshots installed locally and there is no repository declaration for them in the samples. If you "cd spring-batch; mvn install -P bootstrap" you should have those jars locally. If you want to update the README or samples guide please feel free to send a pull request.

      Comment

      Working...
      X