Sep 9th, 2010, 10:12 AM
Maven issue building Spring Batch Samples
I am a newbie to Spring Batch (and maven) and I am trying to walk through the samples.....but i hit a major hurdle just getting them to compile:
Project build error: Unresolveable build extension: Plugin org.springframework.build.aws:org.springframework. build.aws.maven:3.0.0.RELEASE or one of its dependencies could not be resolved: Missing:
1) org.springframework.build.aws:org.springframework. build.aws.maven:maven-plugin:3.0.0.RELEASE
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.springframework.build.aws -DartifactId=org.springframework.build.aws.maven -Dversion=3.0.0.RELEASE -Dpackaging=maven-plugin -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.springframework.build.aws -DartifactId=org.springframework.build.aws.maven -Dversion=3.0.0.RELEASE -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
1 required artifact is missing.
from the specified remote repositories:
central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
How do I resolve this?
Sep 9th, 2010, 12:15 PM
You can change the version of the extension to 2.0.0.RELEASE.
Update: actually, I'm not sure that 3.0.0.RELEASE is in the Central repository. I'll try and upload it then it should work out of the box.
Sep 9th, 2010, 12:23 PM
I hate to be such a newbie with Maven and Spring......but i am trying to learn.
I am looking at the plugin management part of the pom and I see 2 choices, and i am sorry I dont know what you mean to switch to maven 2.2.1 or change the version to 2.0 RELEASE.
Sep 10th, 2010, 06:24 AM
Just try it again (I uploaded the extension to the default public repo, so if you are on the interweb it should work). Maven 2.2.1 is recommended, but probably not necessary for building the samples.
Sep 10th, 2010, 07:43 AM
Thanks for uploading the jar. I would like to understand how to get around what you had to reapir and use the correct version of Maven. I am assuming this is gated by the plugin part of the pom.xml......but it didnt seem to matter what i plugged in for the version, it was still complaining.
I attached a screenshot to make sure i am looking at the correct item to configure.
Sep 10th, 2010, 08:14 AM
There should be nothing to change, and it should just work. Try building from the command line in case your IDE is stuck on something random. Paste back the error message if it still doesn't work.
Sep 10th, 2010, 08:25 AM
works - but just trying to figure this out
It works perfectly now with no changes. I think i see what you wanted me to change in the <extension> tags, but for some reason it is not editable in eclipse.....in the effective POM.
Originally Posted by Dave Syer
maybe it is a higher level preference i need to go after to change this.
Sep 10th, 2010, 10:08 AM
The extension is declared in the parent pom, so you would have had to override that locally by copying it over into the samples pom and changing the version. Good that it works now anyway.
Sep 10th, 2010, 10:13 AM
Cool, I see it. I was able to modify it and everything work that way as well. I am starting to see the power behind the maven way of handling dependencies.....
Thanks for your help.