I'm working with a few developers and we would like to share some jars as we're working through the early iteration of a projects code. We would like to just pop up a quick private maven repository server to use for a short bit. In ruby it's a simple as typing:
gem server
Apparently, there's no?
mvn server
Even a simple maven dependency to github would be workable for a short bit. Apparently, there is no main-stream reliable maven plug-in for that either?
gem 'nokogiri', :git => 'https://github.com/tenderlove/nokogiri.git', :branch => '1.4'
The simplest answer I found is here: Hosting a Maven repository on github.
Of course one of the answers in the above StackOverflow reference is in the vein "Oh don't do that! It's very bad!". Well no duh! I got the impression that generally people didn't want to do it, but there wasn't a quicker and simpler choice for a minimal small solution.
Is there?
Michael Corleone: Just when I thought I was out... they pull me back in to code Java again.
Consider using one of the following:
They are easy to install (I run Nexus on my development machine to keep an off-line copy of my dependencies). Nexus is built by the guys who invented Maven and has a book available:
You can use Nexus (and Artifactory pro version) to host both your java jars and your ruby gems.
In conclusion, comparing the above products to "gem server" is inadequate. They're more like geminabox with more features.
Have a look at Reposilite. Download the jar and run
java -Dreposilite.port=8080 -jar reposilite-<VERSION>.jar
and check http://localhost:8080
For more information look at Reposilite documentation and this article.
If your repositories are already on GitHub then the fastest way to share their Maven artifacts is with JitPack.
There's not much setup on your part, you just add this to pom.xml:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
<dependency>
<groupId>com.github.User</groupId>
<artifactId>Repository</artifactId>
<version>Tag</version>
</dependency>
The way it works is - JitPack checks out code from GitHub and builds it. All the Maven artifacts from the build get published.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With