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

老子叫甜甜 提交于 2020-01-03 02:53:10

问题


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?


回答1:


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.


来源:https://stackoverflow.com/questions/11327361/eclipse-how-to-add-all-dependencies-of-one-project-to-another

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!