Exception trying to build using mvn install

Jul 20, 2011 at 6:07 PM

I am getting the following failure trying to use maven to install and build the SDK. I am new to maven so maybe there is just something I missed with the maven installation?

I downloaded the sdk , cd to the directory then typed

mvn install

and get

[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.796s
[INFO] Finished at: Wed Jul 20 11:01:13 PDT 2011
[INFO] Final Memory: 2M/15M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project hv-jaxb: Could not resolve dependencies for project com.microsoft.hsg:hv-jaxb:jar:1.3.0: Could not fin
d artifact com.microsoft.hsg:hv-sdk:jar:1.3.0 in central (http://repo1.maven.org/maven2) -> [Help 1]

Jul 21, 2011 at 6:08 AM
Edited Jul 21, 2011 at 6:37 AM

It looks like you typed mvn install from inside the hv-jaxb project before building the sdk project.

There are several projects in the download:  sdk, hv-jaxb, examples/ui-jaxb, examples/ui-sdk.  They depend on each other like this:

|            |
hv-jaxb    examples/ui-sdk

If you try to build the hv-jaxb project before building the sdk, then you will not be able to resolve that dependency.

Start where you unzipped the download:

> cd healthvault-sdk-1.3.0
> mvn install

The build system will build everything in the correct order to resolve dependencies.

Jul 21, 2011 at 3:19 PM

I thought I that as well but I am definitly in the root folder:

 Volume in drive C is OS
 Volume Serial Number is 2C3E-96C8

 Directory of C:\projects\healthvault-sdk-1.3.0

04/07/2011  02:45 PM    <DIR>          .
04/07/2011  02:45 PM    <DIR>          ..
04/07/2011  02:45 PM    <DIR>          android
04/07/2011  02:46 PM    <DIR>          assemble
04/07/2011  02:46 PM    <DIR>          examples
04/07/2011  02:46 PM    <DIR>          hv-jaxb
04/07/2011  02:47 PM    <DIR>          java-1.4.2
04/07/2011  02:43 PM               882 pom.xml
04/07/2011  02:43 PM             3,886 README.txt
04/07/2011  02:47 PM    <DIR>          sdk
               2 File(s)          4,768 bytes
               8 Dir(s)  129,357,324,288 bytes free

C:\projects\healthvault-sdk-1.3.0>mvn install
[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/microsoft/hsg/hv/1.3.0/hv-1.3.0.pom
[ERROR] The build could not read 2 projects -> [Help 1]
[ERROR]   The project hv:weight-jaxb-ui:1.3.0 (C:\projects\healthvault-sdk-1.3.0\examples\ui-jaxb\pom.xml) has 1 error
[ERROR]     Non-resolvable parent POM: Could not find artifact com.microsoft.hsg:hv:pom:1.3.0 in central (http://repo1.maven.org/maven2) and 'pa
rent.relativePath' points at wrong local POM @ line 10, column 11 -> [Help 2]


Jul 21, 2011 at 4:16 PM

My bad. I was using Maven 3. All fine now, thanks for your help.