problem building with mvn 3.0.2

May 3, 2011 at 10:48 PM

Hi,

I haven't had any luck getting this to build under Mac OS:

$ mvn installl
[INFO] Scanning for projects...
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]   
[ERROR]   The project hv:weight-jaxb-ui:1.2 (/Users/alison/src/hv-sdk/examples/ui-jaxb/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find com.microsoft.hsg:hv:pom:1.2 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 and 'parent.relativePath' points at wrong local POM @ line 10, column 11 -> [Help 2]
[ERROR]   
[ERROR]   The project com.microsoft.hsg:ui-sdk:1.2 (/Users/alison/src/hv-sdk/examples/ui-sdk/pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Failure to find com.microsoft.hsg:hv:pom:1.2 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 and 'parent.relativePath' points at wrong local POM @ line 28, column 13 -> [Help 2]
[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/ProjectBuildingException
[ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException

My version is the standard Maven that comes with Mac OS:

$ mvn -version
Apache Maven 3.0.2 (r1056850; 2011-01-08 19:58:10-0500)
Java version: 1.6.0_24, vendor: Apple Inc.
Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.6.7", arch: "x86_64", family: "mac"

Is there some other way to get this built or is there some strange dependency/path resolution issue that's changed in Maven 3? I'm not sure where to start troubleshooting because I haven't used Maven in almost 3 years.

Thanks!

Alison

May 3, 2011 at 10:58 PM

Oops, seems I jumped the gun a little bit. This can be fixed by adding the following line into the <parent> element in both of the example poms:

<relativePath>../..</relativePath>

As per https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-ParentPOMResolution

Coordinator
May 4, 2011 at 12:52 AM

Thanks, I'll have a look at the updated maven.  I've been using 2.2.x on all platforms.

--Rob