开发者

How can I reference another project in Eclipse Java EE projects?

I'm wondering how can I reference another project in Eclipse Java EE projects, just like you do in normal Java Projects. In fact I'd like to be able to separate development in multiple projects and still be able to debug and work with each. Instead I can reference projects in Java EE projects, but this doesn't automatically put the Jar inside WEB-INF/lib. How do you set up to do this? This is necessary as you grow up from simple web开发者_C百科apps to more complex ones.


This is done under Deployment Properties section of the project properties (reachable via context menu of the project).You add/remove projects, jars libraries to be assembled to your deployment unit from there.

Edit: As of Eclipse Kepler, you can find this by right-clicking the project and picking Deployment Assembly. Click Add and add the dependency project.


In IntelliJ you import other modules into your project and declare dependencies between them. I'd look for an analogous feature in Eclipse - or switch to IntelliJ.


For new eclipse version (mine is kepler), the way is:
Project properties > Deployment Assembly > Add > choose project > pick the project > finish...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜