aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Mvn install failure due to improper parent pom Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Mvn install failure due to improper parent pom" Watch "Mvn install failure due to improper parent pom" New topic
Author

Mvn install failure due to improper parent pom

avinash sudh
Greenhorn

Joined: Apr 22, 2013
Posts: 8
Hi i am getting the following error when i try to install the "Apache camel oauth tutorial" project(which is at http://camel.apache.org/tutorial-oauth.html). I have attached the pom.xml file. Please let me know what the issue is.

Scanning for projects...
The build could not read 1 project -> [Help 1]

The project org.apache.camel:camel-example-gauth:2.12-SNAPSHOT (C:\Users\avinashms\camel-example-gauth\pom.xml) has 1 error
Non-resolvable parent POM: Could not find artifact org.apache.camel:examples:pom:2.12-SNAPSHOT and 'parent.relativePath' points at wrong local POM @ line 22, column 13 -> [Help 2]
o see the full stack trace of the errors, re-run Maven with the -e switch.
e-run Maven using the -X switch to enable full debug logging.

or more information about the errors and possible solutions, please read the following articles:
Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException
avinashms\camel-example-gauth>


Below is my pom.xml file :


Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

The error indicates that Maven cannot find version 2.12-SNAPSHOT of the parent POM. And looking in Maven Central, the latest version of that POM is 2.11.0.

You have two choices for fixing this error:
a) You can change the version of the parent POM at line 25.
b) You can add a reference to the snapshot repository that contains version 2.12-SNAPSHOT.

Which you do depends on if your code needs new features that are available on in 2.12.


JBoss In Action
avinash sudh
Greenhorn

Joined: Apr 22, 2013
Posts: 8
Thanks a lot Peter. Could you please tell me the location of Maven central and how you figured out the version of parent pom?
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5843
    
    7

Maven Central is located at http://central.maven.org/maven2/
Be aware that if you go to that URL, you will be presented with a search page. If you want to use the browser to click through the artifact hierachy, you will need to add the first one or two parts of the groupId. For example, you might want to start by going to http://central.maven.org/maven2/org/apache and browse to "camel" from there.
avinash sudh
Greenhorn

Joined: Apr 22, 2013
Posts: 8
Peter ... thank you for giving me the link to the Maven central
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Mvn install failure due to improper parent pom