How can I link to another project in Eclipse Java EE projects?

I am wondering how I can refer to another project in Eclipse Java EE projects, as well as in regular Java projects. In fact, I would like to be able to share development in several projects and still be able to debug and work with each. Instead, I can reference projects in Java EE projects, but this does not automatically put the Jar in WEB-INF / lib. How did you tune in to this? This is necessary because you have grown from simple webapps to more complex ones.

+6
source share
3 answers

This is done in the "Deployment Properties" section of the project properties (available through the project context menu). You add / remove projects, library libraries that will be collected in your deployment unit.

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

+5
source

In IntelliJ, you import other modules into your project and declare dependencies between them. I would look for a similar function in Eclipse - or switch to IntelliJ.

0
source

For the new version of eclipse (my is kepler), the path is:
Project Properties> Assembly Deployment> Add> Select Project> Select Project> Finish ...

0
source

Source: https://habr.com/ru/post/885403/


All Articles