Hashken
Hashken

Reputation: 4646

Eclipse, How to add all dependencies of one project to another

I have a project in Eclipse which I built using Maven and it has hundreds of JARs as reference libraries. Is there a way to include all these reference libraries to another project?

Upvotes: 3

Views: 16134

Answers (1)

Hashken
Hashken

Reputation: 4646

Since the original project involved Maven dependencies, there are two ways of doing this.

- Maven

To accomplish this in Maven style refer to this question. How to add "Maven Managed Dependencies" library in build path eclipse?

- Adding a project as dependency

The more simpler way of doing this (for beginners and testers), is to just include the original project as a dependency to the new project.

  • In your original project, travel to Properties > Java Build Path > Order and Export. Select all the dependencies that you want for your new project.
  • In your new project, travel to Properties > Java Build Path > Projects. Now add the original project.

Upvotes: 10

Related Questions