mavendependency-managementgoogle-voicemaven-wagon-plugin

How can I use maven project hosted at Google code as dependency?


I want to create a maven project to depend on maven-structured Google Code project that has been frozen before they has been published to maven central repo.

Since their code is available ( http://code.google.com/p/google-voice-java/source/browse/branches/maven/pom.xml ), it has properly designed pom.xml that shows all their dependencies, I believe it would be a way to specify the path to their repo, and download their code and build their artifacts as a part of my building cycle. Alternatively, I should download their jars, add to my local repo and add their dependencies to my dependencies list.

I googled much about it, but the only founding is wagon plugin, that makes opposite, it puts the build artifacts to google code repo turning it into a maven repo.

Please, advice!


Solution

  • This project appears to be neither published to maven central nor google code's snapshot repo (https://code.google.com/p/google-maven-repository/wiki/ProjectSetup).

    I would recommend either using:

    mvn install:install-file -Dfile=… -DpomFile=… -Dpackaging=jar
    

    or

     mvn install:install-file -Dfile=... -DgroupId=... -DartifactId=... -Dversion=1.0-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
    

    This puts the artifact in your local repo directory (.../.m2/repository/) and makes it available for use in the dependencies section of your pom.xml.