常春藤DE + WTP:如何解决 WTP 忽略 ivy 库的问题?

发布于 2024-09-03 15:58:39 字数 733 浏览 1 评论 0原文

我发现 IvyDE 允许我解决 Web 应用程序的冻结核心版本的突出问题,该版本需要能够从更新库中提取额外的代码,以便它位于 Web 应用程序的类路径上。为了提高开发速度,我发现“在工作区中解析”功能允许 Eclipse 将更新库项目的文件夹直接放在冻结核心 Web 应用程序的构建路径上。对于普通 Java 应用程序来说效果很好。

然而,对于 Web 应用程序,WTP(Eclipse Java EE 模块)似乎没有在类路径上部署 ivy 库表示的文件夹。这是非常不方便的。 IvyDE 开发人员认为这是 WTP 的缺点,不会修复它。我无法完全理解 WTP 人员对此的说法(除了它显然很复杂),只是他们还不会修复它。

所以问题是:

是否有一种合理的方式与 IvyDE 合作,使我能够使用未冻结的更新库项目来维护冻结的 Web 应用程序,最好使用工作区中的 Resolve 工具?

我们目前使用 GlassFish 3.0.1 作为 Web 容器。


编辑:JIRA问题是 https://issues.apache.org/jira/browse/ IVYDE-227


编辑:经过一些实验,我们发现 Maven 非常适合我们,并已切换到它。原因之一是现代 Eclipse 中的 Maven 工具具有更好的 WTP 支持,并且可以很好地映射到我们的工作流程。

I have found IvyDE which allows me to solve an outstanding problem of having a frozen core version of a web application, which needs to be able to pull in extra code from an update library so it is on the classpath of the web application. For development speed I've found that the "Resolve in Workspace" facility allows Eclipse to put the folders of the update library project directly on the build path of the frozen core web application. Works well for normal Java applications.

For Web Applications, however, it seems that WTP (the Eclipse Java EE module) does not deploy the folders denoted by the ivy library on the classpath. This is very inconvenient. The IvyDE developers consider this to be a WTP shortcoming and will not fix it. I cannot fully understand what the WTP folks say about this (except that it is apparently complicated) except that they will not fix it yet.

So the question is:

Is there a reasonable way of working with IvyDE that buys me the ability to maintain a frozen webapp with an unfrozen update library project, preferrably using the Resolve in Workspace facility?

We currently use GlassFish 3.0.1 as the web container.


EDIT: The JIRA issue is https://issues.apache.org/jira/browse/IVYDE-227


EDIT: After some experimentation we found that Maven works well for us, and have switched to that. One of the reasons is that the Maven tooling in modern Eclipses have much better WTP support and maps well to our workflow.

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

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

发布评论

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

评论(3

故人的歌 2024-09-10 15:58:39

对于此类事情,我们只需在 Eclipse 项目中添加一个基于 Ant 的 Builder,监视依赖项文件,它只需直接更新 WEB-INF/lib 并调用工作区刷新即可。这样我们就不会依赖于特定的插件,并且它在构建服务器上也可以很好地工作,无需任何更改。

For that kind of things, we simply add an Ant based Builder in the Eclipse project, monitoring the dependencies files, which simply updates WEB-INF/lib directly and calls for a workspace refresh. This way we are not tied to a specific plugin, and it's working great on the build server as well without any changes.

欢你一世 2024-09-10 15:58:39

您是否尝试将 ivy.xml 模块添加到项目的 Java EE 模块依赖项中?

替代文本
(来源:espenberntsen.net

Did you try to add the ivy.xml module to your project's Java EE Module Dependencies?

alt text
(source: espenberntsen.net)

初心未许 2024-09-10 15:58:39

我认为这回答了您的问题: 如何在 eclipse 中使用 Ivy + IvyDE 将不同的 jar 放入 lib 和 web-inf/lib

建议您使用 Project->Properties 将检索依赖规则添加到您的项目中->ivy 配置 GUI。然后您可以 Project->Ivy->Retrieve... 将所有 ivy jar 复制到您的 Web 项目的 WEB-INF/lib 文件夹(或您希望复制它们的任何位置)。

I think this answers your question: How to use Ivy + IvyDE in eclipse to put different jars in lib and web-inf/lib

It suggests you to add retrieve dependency rules to your project using Project->Properties->Ivy configuration GUI. Then you can Project->Ivy->Retrieve... to copy all ivy jars to the WEB-INF/lib folder of your web project (or wherever you wish to copy them).

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