有没有像 Python 的 easy_install 这样的 Java 包管理器?

发布于 2024-08-30 09:06:39 字数 1539 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

青芜 2024-09-06 09:06:39

Maven 确实提供基于远程存储库依赖管理(就像可浏览的中央存储库),可搜索

Maven Ant 任务 (已退休) 使用 Maven 的存储库来为 Ant 构建提供依赖管理等。

Ant Ivy 是 Maven Ant 任务的另一种替代方案。

MOP 是另一个利用 Maven 存储库和依赖项的命令行工具。

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.

短暂陪伴 2024-09-06 09:06:39

编辑2017-04-27:我对jpm4j缺乏前进动力以及缺乏以社区为中心的开发感到失望。所以我发明了一个名为 jrun 的新工具。我邀请大家都来看看。它的范围比 Python 的 pip 等工具更窄,但它确实允许您以易于使用的方式从远程 Maven 存储库执行 Java 代码。


查看 JPM4J。这是 Peter Kriens(BND 名人)的一个项目。他去年首次提出,截至目前这篇文章已经写了几个月了,看起来相当令人印象深刻。

它的灵感来自 Node 的 npm,与该工具一样,安装也很简单:

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

当然,Windows 也有一个点击式安装程序。

然后,您可以像其他命令行包管理器工具一样安装东西。例如:

jpm install org.codehaus.groovy:groovy-all

install命令操作Maven坐标。基本上,JAR 只需要在其清单中包含一个 JPM-Command 条目,并且 jpm 知道如何将其主类公开为命令行可执行文件。

就我个人而言,我真的很希望看到 Java 社区支持这样的努力。一个真正可靠的 Java 包管理器早就应该出现了!

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!

素食主义者 2024-09-06 09:06:39

来自 Apache 的 Ivy 是我所知道的最接近的东西。

Ivy from Apache is the closest thing I know of.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文