IvyDE + WTP: How to workaround that ivy library is ignored by WTP?

狂风中的少年 提交于 2019-12-06 07:24:06

问题


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.


回答1:


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.




回答2:


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


(source: espenberntsen.net)




回答3:


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).



来源:https://stackoverflow.com/questions/2955826/ivyde-wtp-how-to-workaround-that-ivy-library-is-ignored-by-wtp

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