gotch4
gotch4

Reputation: 13299

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 webapps to more complex ones.

Upvotes: 6

Views: 6251

Answers (3)

Gorkem Ercan
Gorkem Ercan

Reputation: 3226

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.

Upvotes: 5

teddy
teddy

Reputation: 534

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

Upvotes: 0

duffymo
duffymo

Reputation: 309008

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.

Upvotes: 0

Related Questions