Edit 2017-04-27: I was disappointed by the lack of forward momentum for jpm4j and the lack of community oriented development. So I came up with a new tool called jrun . I invite everyone to check this out. It has a narrower scope than tools like Python pip , but allows you to execute Java code from remote Maven repositories in a simple way.
Check out JPM4J . This is a project by Peter Kriens (from the fame of BND). He first proposed it last year , and at the time of writing this article he had been in a few months and looks pretty impressive.
It was inspired by Node npm, and, like this tool, the installation is cinch:
OS X:
local $ curl http://www.jpm4j.org/install/local | sh global $ curl http://www.jpm4j.org/install/global | sudo sh
Linux:
curl http://www.jpm4j.org/install/script | sh
And Windows, of course, has a click.
Then you install the material in a manner similar to other command line package manager tools. For example:.
jpm install org.codehaus.groovy:groovy-all
The installation command manages the coordinates of Maven. Basically, a JAR just needs a JPM-Command entry in its manifest, and jpm knows how to expose its main class as a command-line executable.
Personally, I would be very pleased to see that the Java community overshadows such an effort. A really solid Java package manager is long overdue!
ctrueden Dec 05 '13 at 10:57 2013-12-05 10:57
source share