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

  • Building batch samples

    Hi,

    I'm new to the spring framework all together, so please bear with me. I'm trying to get started with Spring Batch, but can't get the samples to build. I'm using Oracle Linux 6.0 64-bit edition, and Spring Batch version 2.0.1-RELEASE.

    Following the getting started guide, I extracted spring-batch-2.0.1.RELEASE.zip, browsed to spring-batch-samples, and ran mvn test. The result is the following:

    Code:
    [jay@orc spring-batch-samples]$ mvn test
    [INFO] Scanning for projects...
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for org.springframework.batch:spring-batch-samples:jar:2.0.1.RELEASE
    [WARNING] 'dependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: stax:stax:jar -> duplicate declaration of version 1.2.0 @ org.springframework.batch:spring-batch-parent:2.0.1.RELEASE, /home/jay/SpringSource-spring-batch-566a966/spring-batch-parent/pom.xml, line 406, column 16
    [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.0.1.RELEASE, /home/jay/SpringSource-spring-batch-566a966/spring-batch-parent/pom.xml, line 145, column 12
    [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.0.1.RELEASE, /home/jay/SpringSource-spring-batch-566a966/spring-batch-parent/pom.xml, line 153, column 12
    [WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
    [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-jxr-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.0.1.RELEASE, /home/jay/SpringSource-spring-batch-566a966/spring-batch-parent/pom.xml, line 170, column 12
    [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.0.1.RELEASE, /home/jay/SpringSource-spring-batch-566a966/spring-batch-parent/pom.xml, line 176, column 12
    [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.0.1.RELEASE, /home/jay/SpringSource-spring-batch-566a966/spring-batch-parent/pom.xml, line 186, column 12
    [WARNING]
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING]
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING]
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Samples 2.0.1.RELEASE
    [INFO] ------------------------------------------------------------------------
    [WARNING] The POM for opensymphony:quartz-all:jar:1.6.0 is missing, no dependency information available
    [WARNING] The POM for com.oracle.jdbc:com.springsource.oracle.jdbc:jar:10.2.0.2 is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 2.274s
    [INFO] Finished at: Thu Jun 16 11:21:04 EDT 2011
    [INFO] Final Memory: 3M/8M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal on project spring-batch-samples: Could not resolve dependencies for project org.springframework.batch:spring-batch-samples:jar:2.0.1.RELEASE: Failure to find com.oracle.jdbc:com.springsource.oracle.jdbc:jar:10.2.0.2 in http://repository.springsource.com/maven/bundles/external was cached in the local repository, resolution will not be reattempted until the update interval of com.springsource.repository.bundles.external has elapsed or updates are forced -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
    What does this mean?

    Thanks,
    Jay Sullivan

  • #2
    I tried alternatively downloading the nodependencies version, still with errors:

    Code:
    [jay@orc spring-batch-samples]$ mvn test
    [INFO] Scanning for projects...
    Downloading: http://repo1.maven.org/maven2/org/springframework/build/aws/org.springframework.build.aws.maven/3.0.0.RELEASE/org.springframework.build.aws.maven-3.0.0.RELEASE.pom
    Downloaded: http://repo1.maven.org/maven2/org/springframework/build/aws/org.springframework.build.aws.maven/3.0.0.RELEASE/org.springframework.build.aws.maven-3.0.0.RELEASE.pom (3 KB at 5.0 KB/sec)
    Downloading: http://repo1.maven.org/maven2/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.pom
    Downloaded: http://repo1.maven.org/maven2/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.pom (8 KB at 9.7 KB/sec)
    Downloading: http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.pom
    Downloaded: http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.pom (6 KB at 8.2 KB/sec)
    Downloading: http://repo1.maven.org/maven2/commons-codec/commons-codec/1.2/commons-codec-1.2.pom
    Downloaded: http://repo1.maven.org/maven2/commons-codec/commons-codec/1.2/commons-codec-1.2.pom (4 KB at 8.2 KB/sec)
    Downloading: http://repo1.maven.org/maven2/net/java/dev/jets3t/jets3t/0.7.2/jets3t-0.7.2.pom
    Downloaded: http://repo1.maven.org/maven2/net/java/dev/jets3t/jets3t/0.7.2/jets3t-0.7.2.pom (2 KB at 0.8 KB/sec)
    Downloading: http://repo1.maven.org/maven2/commons-codec/commons-codec/1.3/commons-codec-1.3.pom
    Downloaded: http://repo1.maven.org/maven2/commons-codec/commons-codec/1.3/commons-codec-1.3.pom (6 KB at 7.1 KB/sec)
    Downloading: http://repo1.maven.org/maven2/org/springframework/build/aws/org.springframework.build.aws.maven/3.0.0.RELEASE/org.springframework.build.aws.maven-3.0.0.RELEASE.jar
    Downloading: http://repo1.maven.org/maven2/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar
    Downloading: http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
    Downloading: http://repo1.maven.org/maven2/commons-codec/commons-codec/1.2/commons-codec-1.2.jar
    Downloading: http://repo1.maven.org/maven2/net/java/dev/jets3t/jets3t/0.7.2/jets3t-0.7.2.jar
    Downloaded: http://repo1.maven.org/maven2/commons-codec/commons-codec/1.2/commons-codec-1.2.jar (30 KB at 18.4 KB/sec)
    Downloading: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
    Downloaded: http://repo1.maven.org/maven2/org/springframework/build/aws/org.springframework.build.aws.maven/3.0.0.RELEASE/org.springframework.build.aws.maven-3.0.0.RELEASE.jar (21 KB at 12.6 KB/sec)
    Downloaded: http://repo1.maven.org/maven2/commons-httpclient/commons-httpclient/3.1/commons-httpclient-3.1.jar (298 KB at 165.7 KB/sec)
    Downloaded: http://repo1.maven.org/maven2/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar (38 KB at 18.0 KB/sec)
    Downloaded: http://repo1.maven.org/maven2/net/java/dev/jets3t/jets3t/0.7.2/jets3t-0.7.2.jar (388 KB at 151.4 KB/sec)
    Downloaded: http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar (165 KB at 138.0 KB/sec)
    [WARNING]
    [WARNING] Some problems were encountered while building the effective model for org.springframework.batch:spring-batch-samples:jar:2.1.8.RELEASE
    [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: net.sourceforge.jtds:jtds:jar -> version 1.2.4 vs 1.2.2 @ line 191, column 15
    [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.1.8.RELEASE, /home/jay/spring-batch-2.1.8.RELEASE/samples/spring-batch-parent/pom.xml, line 236, column 12
    [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 251, column 12
    [WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
    [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-jxr-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.1.8.RELEASE, /home/jay/spring-batch-2.1.8.RELEASE/samples/spring-batch-parent/pom.xml, line 276, column 12
    [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.1.8.RELEASE, /home/jay/spring-batch-2.1.8.RELEASE/samples/spring-batch-parent/pom.xml, line 282, column 12
    [WARNING] 'reporting.plugins.plugin.version' for org.apache.maven.plugins:maven-javadoc-plugin is missing. @ org.springframework.batch:spring-batch-parent:2.1.8.RELEASE, /home/jay/spring-batch-2.1.8.RELEASE/samples/spring-batch-parent/pom.xml, line 292, column 12
    [WARNING]
    [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
    [WARNING]
    [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
    [WARNING]
    [INFO]
    [INFO] ------------------------------------------------------------------------
    [INFO] Building Samples 2.1.8.RELEASE
    [INFO] ------------------------------------------------------------------------
    Downloading: http://repo1.maven.org/maven2/com/springsource/bundlor/com.springsource.bundlor.maven/1.0.0.RELEASE/com.springsource.bundlor.maven-1.0.0.RELEASE.pom
    [WARNING] The POM for com.springsource.bundlor:com.springsource.bundlor.maven:jar:1.0.0.RELEASE is missing, no dependency information available
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 9.156s
    [INFO] Finished at: Thu Jun 16 11:25:40 EDT 2011
    [INFO] Final Memory: 3M/7M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Plugin com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.springsource.bundlor:com.springsource.bundlor.maven:jar:1.0.0.RELEASE: Could not find artifact com.springsource.bundlor:com.springsource.bundlor.maven:pom:1.0.0.RELEASE in central (http://repo1.maven.org/maven2) -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

    Comment


    • #3
      2.0.1 is very old. It had an optional dependency on oracle JDBC drivers that you can remove from the sample POM if you feel like it (it used to be resolvable from a public repo butisn't any longer). Or you can move to 2.1.8 (the most recent release).

      Comment


      • #4
        If you'll notice, I used 2.1.8.RELEASE in the nodependencies version.

        Comment


        • #5
          So, what is com.springsource.bundlor:com.springsource.bundlor. maven:jar:1.0.0.RELEASE? Is this a necessary dependency?

          Comment


          • #6
            I see that it is Bundlor. So I downloaded bundlor and I have the file com.springsource.bundlor-1.0.0.RELEASE.jar. Where should I put it and how can I get the test build to pick up on this file?

            Comment


            • #7
              I found this question on stack overflow, which is exactly the same error I'm having.

              One guy suggested doing mvn test -P bootstrap, but that gives me this error:

              Code:
              [INFO] ------------------------------------------------------------------------
              [INFO] BUILD FAILURE
              [INFO] ------------------------------------------------------------------------
              [INFO] Total time: 1:15.033s
              [INFO] Finished at: Fri Jun 17 12:27:54 EDT 2011
              [INFO] Final Memory: 4M/11M
              [INFO] ------------------------------------------------------------------------
              [ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run (generate-sql) on project spring-batch-samples: Execution generate-sql of goal org.apache.maven.plugins:maven-antrun-plugin:1.3:run failed: Plugin org.apache.maven.plugins:maven-antrun-plugin:1.3 or one of its dependencies could not be resolved: Could not find artifact foundrylogic.vpp:vpp:jar:2.2.1 in apache-snapshots (http://people.apache.org/maven-snapshot-repository/) -> [Help 1]
              [ERROR]
              [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
              [ERROR] Re-run Maven using the -X switch to enable full debug logging.
              [ERROR]
              [ERROR] For more information about the errors and possible solutions, please read the following articles:
              [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException
              So it appears now I need maven-antrun-plugin.

              Comment


              • #8
                Okay, I think the fact that I was using Maven 3.0.3 was part of the issue, and I needed to switch to Maven 2.2.1 (why does the samples guide not mention this requirement?),

                Comment

                Working...
                X