设置引用另一个项目的Eclipse动态Web项目 [英] Set up an Eclipse Dynamic Web Project referencing another project

查看:374
本文介绍了设置引用另一个项目的Eclipse动态Web项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse 3.6 Helios中设置了一个简单的动态Web项目,但是遇到其他项目中的代码无法使用。

I've got a simple Dynamic Web project set up in Eclipse 3.6 Helios, but am having trouble getting it to make use of the code in another project that I've got.

我已经将我的另一个项目的引用添加到我的Web项目的构建路径中,而在编译方面没有任何问题,只是在部署和测试方面结果。构建的Web应用程序在WEB-INF / lib目录中没有jar,如此公平,找不到代码。问题是我如何设定这个。我已经看过帮助,我可以找到和googled一点,但找不到任何明显的帮助。

I've added a reference to my other project to the build path of my web project, and I've got no problems in terms of compiling, only in terms of deploying and testing the result. The built web application doesn't have a jar in the WEB-INF/lib directory, so fair enough it can't find the code. The question is how I set this up. I've looked through the help that I can find and googled a bit but can't find anything obvious that helps out.

我如何设置我的Web项目在部署它时,它神奇地具有我的依赖项目的代码?

How do I set up my web project so that on deploying it it magically has the code from my dependent project inside it?

谢谢。

注意:理想情况下,我想要一个不涉及设置某种方式的解决方案的构建工具。 Web项目自行部署而无需依赖任何构建工具(或至少对最终用户不可见),因此希望将引用项目集成到该项目中。

Note: Ideally I'd like a solution that doesn't involve setting up some kind of build tool. The web project deploys itself without recourse to any build tool (or at least none visible to end user), so was rather hoping that a references project could be integrated into that easily.

推荐答案

部署中的内容不是由构建路径决定的,而是由动态Web项目的首选项中的部署程序条目决定。

What goes in the deployment is determined not by the build path but by the Deployment Assembly entry in Preferences for the dynamic web project.

这篇关于设置引用另一个项目的Eclipse动态Web项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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