Is there a package manager for Java like easy_install for Python? [closed]

二次信任 提交于 2019-12-02 14:02:51
Pascal Thivent

Maven does provide dependency management based on remote repositories (like the central repo) that are browsable, searchable.

Maven Ant Tasks (retired) use Maven's repositories to provide dependency management and more to Ant builds.

Ant Ivy is another alternative to Maven Ant Tasks.

MOP is another command line tool that leverages Maven's repository and dependencies.

ctrueden

Edit 2017-04-27: I have been disappointed by the lack of forward momentum for jpm4j, and the lack of community-centric development. So I invented a new tool called jrun. I invite everyone to check it out. It has a narrower scope than tools like Python's pip, but it does let you execute Java code from remote Maven repositories in an easy-to-use manner.


Check out JPM4J. It is a project by Peter Kriens (of BND fame). He first proposed it last year, and as of this writing it has been around for a few months and is looking pretty impressive.

It was inspired by Node's npm, and like that tool, installation is a 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 has a clicky installer, of course.

Then you install stuff similarly to other command-line package manager tools. E.g.:

jpm install org.codehaus.groovy:groovy-all

The install command operates Maven coordinates. Basically, the 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 really love to see the Java community get behind an effort like this. A really solid Java package manager is years overdue!

Ivy from Apache is the closest thing I know of.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!