9

I am trying to build the sample application for spring batch 2.1.6. (ie. spring-batch-2.1.6.RELEASE/samples/spring-batch-samples) using maven but am getting this error for a missing plugin:

[ERROR] Plugin com.springsource.bundlor:com.springsource.bundlor.maven:1.0.0.RELEASE or one of its dependencies could not be resolved: Failure to find com.springsource.bundlor:com.springsource.bundlor.maven:jar:1.0.0.RELEASE in http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced ->

Is there another repository I can set up to get this plugin? I am a bit suprised to be getting this errror as this is the latest realease version of spring batch.

Here is the repository section from the pom as it came in the download:

<repositories>
    <repository>
        <id>com.springsource.repository.bundles.external</id>
        <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle External</name>
        <url>http://repository.springsource.com/maven/bundles/external</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

4 Answers 4

5

The project's parent pom has a bootstrap profile which contains the necessary repository definitions. Build the project with the command mvn test -P bootstrap and it will download the dependencies.

P.S. This is explained in the readme's instructions that how to build Spring Batch. It would be good if they would also tell how to do it in the instructions for using the samples - maybe you could file a bug report?

2
  • I have the same problem as Shane. When I try your fix, I get this error instead: [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 (people.apache.org/maven-snapshot-repository) -> [Help 1] Commented Jun 17, 2011 at 20:36
  • 2
    Ah! I was using the wrong version of Maven. I had to use use Maven 2.2.x (I was using 3.0.x). I got it to build, finally. Commented Jun 17, 2011 at 21:07
1

i am using maven3 and was able to solve this problem by adding this to my pom:

<pluginRepositories>
    <pluginRepository>
        <id>plugin.repo.maven.central2</id>
        <url>http://objectstyle.org/maven2/</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
0

The Spring batch Admin sample build is broken for sure. At least as of today. The -Pbootstrap doesn't help and adding the repos in that profile in my local settings doens't help either.

When I attempted to build spring-batch-admin-sample, I found that I was missing dependencies of spring batch! So I went to build that. There I found that I was missing org.neo4j:neo4j-cypher-dsl-1.9.M04 and also gemfire.7.0.1.jar. Adding repos doesn't help because of the maven2/3 incompatibility issues.

So a sure way to fix this is to go to each repo, download the missing dep and mvn install-file them.

So get the neo4j one here: http://m2.neo4j.org/content/repositories/releases/org/neo4j/neo4j-cypher-dsl/1.9.M04/

Get the gemfire one from here: https://repo.springsource.org/gemstone-release-cache/com/gemstone/gemfire/gemfire/7.0.1/

And then I ran into a foundrylogic.vpp dependency that I found here: http://objectstyle.org/maven2/foundrylogic/vpp/vpp/2.2.1/ Don't forget to get the corresponding poms also to keep it clean and get all the transitives, if any.

Use the mvn install-file plugin described here to get all three deps to your local repo. http://maven.apache.org/plugins/maven-install-plugin/usage.html

Now spring-batch should build clean.

Now if you go to build spring-batch-admin it will still fail because it depends on spring-batch-core-2.2.3.BUILD-SNAPSHOT whereas what we just built was version 3.0.0.BUILD-SNAPSHOT.

So go to spring-batch-admin-parent's pom and modify the pom like so:

 <!-- <spring.batch.version>2.2.3.BUILD-SNAPSHOT</spring.batch.version> -->
 <spring.batch.version>3.0.0.BUILD-SNAPSHOT</spring.batch.version>

And then step back to spring-batch-admin and mvn clean install should build the sample.

Hope this helps someone!

0

I installed maven 3.2.1 and it works.

Not the answer you're looking for? Browse other questions tagged or ask your own question.