什么是超级罐子? [英] What is an uber jar?

查看:43
本文介绍了什么是超级罐子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在阅读 Maven 文档并发现名称 uber-jar.

I am reading Maven documentation and came across the name uber-jar.

uber-jar 是什么意思,它的特点/优势是什么?

What does an uber-jar mean and what are its features/advantages?

推荐答案

Über 是德语中 aboveover 的意思(实际上是与英文over同源).

Über is the German word for above or over (it's actually cognate with the English over).

因此,在这种情况下,uber-jar 是一个over-jar",是简单 JAR (a) 的一个级别,定义为包含您的包 在一个 JAR 文件中的所有依赖项.可以认为这个名字与ultrageek、superman、hyperspace、metadata来自同一个stable,都具有超越常态"的相似含义.

Hence, in this context, an uber-jar is an "over-jar", one level up from a simple JAR (a), defined as one that contains both your package and all its dependencies in one single JAR file. The name can be thought to come from the same stable as ultrageek, superman, hyperspace, and metadata, which all have similar meanings of "beyond the normal".

优点是你可以分发你的 uber-jar 而根本不关心是否在目的地安装了依赖项,因为你的 uber-jar 实际上没有依赖项.

The advantage is that you can distribute your uber-jar and not care at all whether or not dependencies are installed at the destination, as your uber-jar actually has no dependencies.

您自己的东西在 uber-jar 中的所有依赖项在该 uber-jar 中.这些依赖项的所有依赖项也是如此.等等.

All the dependencies of your own stuff within the uber-jar are also within that uber-jar. As are all dependencies of those dependencies. And so on.

(a) 我可能不应该向 Java 开发人员解释 JAR 是什么,但为了完整起见,我将其包括在内.它是一个 Java 档案,基本上是一个文件,通常包含许多 Java 类文件以及相关的元数据和资源.

(a) I probably shouldn't have to explain what a JAR is to a Java developer but I'll include it for completeness. It's a Java archive, basically a single file that typically contains a number of Java class files along with associated metadata and resources.

这篇关于什么是超级罐子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆