分解(解压)的 EAR 与打包的 EAR 文件?

发布于 2024-09-05 00:10:11 字数 213 浏览 4 评论 0原文

在我的办公室,我们使用分解的 EAR(以及其中分解的 WAR 目录)作为我们的测试环境,然后使用打包的环境用于生产。不过,我还没有找到一个很好的解释来解释这背后的原因。我知道从部署的角度来看,在构建期间推出单个文件更容易,但它阻止我们在不进行完整重建的情况下执行属性文件更改之类的操作(我们可以跳过编译,但我们的环境当前将编译和 jar 进程绑定在一起)。

这两种配置之间的主要优点/缺点是什么?

In my office we use exploded EAR's (and inside them exploded WAR directories) for our test environments, and then a packaged one for production. I've yet to find a good explanation of the reason behind this though. I understand it's easier from a deployment perspective to push out a single file during builds, but it prevents us from doing things like property file changes without doing complete rebuilds (we could skip the compiles, but our environment currently binds the compile and jar processes together).

What are the major advantages / disadvantages between these two configurations?

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

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

发布评论

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

评论(2

远山浅 2024-09-12 00:10:11

即使您部署单个 .ear 文件,应用程序服务器也会在使用它之前解压它,并解压其中的 WAR,有时甚至还会解压 JAR。

因此,单个 .ear 文件的唯一好处是部署方便。

Even if you deploy a single .ear file, the appserver will unpack it before using it, as well as unpacking the WARs inside that, and sometimes even the JARs also.

So the only benefit of single .ear files is one of deployment convenience.

笔芯 2024-09-12 00:10:11

爆炸耳朵 - 轻松更新和操作单独的 prop 文件、类文件、jsps 并进行外科手术更改。您有时会想知道最新的生产代码是否包含所有最新的更改,因为您单独移动每个文件,很容易忘记某些内容。当您部署时,您可以通过打包的耳朵确切地知道正在更改哪些文件,您可以一次性更新每个类、jar、jsp。

打包耳朵 - 简单,易于部署,您知道每次部署都会移动所有最新的更改。使用耳朵时,prop 文件真的很奇怪,你必须将它们放在服务器(容器)上并创建某种绝对路径,这样你就知道它们在哪里,并且它们与你的耳朵构建是分开的。

我想我更喜欢爆炸的耳朵。

Exploded ear - easy to update and manipulate individual prop files, class files, jsps and make surgical changes. You do from time to time wonder if the latest production code has all the latest changes because you move each file individually and it would be easy to forget something. When you deploy, you know exactly what file is being changed with a packaged ear you are updating every single class, jar, jsp in one fell swoop.

Packaged ear - simple, easy to deploy, you know with each deployment you are move ALL the latest changes. prop files are really weird when using an ear, you have to put them on the server(container) and create some kind of absolute path so you know where they are and they are separate from your ear build.

I think I prefer the exploded ear.

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