15

I'd like to add my project to public maven repository so that it can be used by community. It doesn't have to be maven central - just any kind of public and free repository for open source code.

How do I do that (in easiest way)?

Daimon
  • 3,703
  • 2
  • 28
  • 30
  • I'd like to add that project is hosted on GoogleCode and as far as I know there is no way to do that automatically (from GoogleCode) – Daimon Nov 30 '11 at 18:53
  • 1
    See also http://stackoverflow.com/questions/1280470/maven-repository-for-google-code-project – Mark O'Connor Nov 30 '11 at 19:59
  • Thanks for comment but I'm using Mercurial for my version contoling needs so this SVN solution probably won't work – Daimon Nov 30 '11 at 21:11
  • Ideally you need to deploy to a proper Maven repo. The following link is another option for doing it via google code: http://www.thewebsemantic.com/2009/04/11/your-very-own-google-code-maven-repo/ – Mark O'Connor Nov 30 '11 at 21:39

1 Answers1

14

Probably 3 ways to do this:

  1. If you have a web server you can simply drop the jar and pom into a directory, eg: yourserver.com/mavenRepo/com/yourcompany/v1.0/yourjar.jar This is the 'quick and dirty' way, but then the public can add yourserver.com/mavenRepo as a repository.
  2. Have an out-facing instance of Nexus or Artifactory
  3. Make the project more official through one of the common open source projects, described in the 'Approved Repository Hosting' and the 'Other Projects' sections of this page.
Sled
  • 18,541
  • 27
  • 119
  • 168
Roy Truelove
  • 22,016
  • 18
  • 111
  • 153
  • Thanks for answer. Here's URL to Sonatype guide https://docs.sonatype.org/display/Repository/Sonatype+OSS+Maven+Repository+Usage+Guide – Daimon Nov 30 '11 at 20:20
  • @Daimon The link given by you makes 404 error, can you update? – Visruth Dec 17 '14 at 14:18
  • 1
    It's probably here now (you'll also need to check referenced pages as well): http://central.sonatype.org/pages/ossrh-guide.html – Daimon Dec 17 '14 at 18:22