Eclipse,如何将一个项目的所有依赖项添加到另一个 [英] Eclipse, How to add all dependencies of one project to another

查看:199
本文介绍了Eclipse,如何将一个项目的所有依赖项添加到另一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse中有一个项目,它使用Maven构建,它有数百个JAR作为参考库。有没有办法将所有这些参考库包含在另一个项目中?

解决方案

由于原始项目涉及到Maven依赖关系,



- Maven



要在Maven样式中完成此操作,请参阅此问题。 如何添加Maven Managed Dependencies图书馆在构建路径eclipse?



- 添加项目作为依赖



更简单的方法这样做(初学者和测试人员),只是将原来的项目作为新项目的依赖项。




  • 在您的原始项目,旅行到属性> Java构建路径>订单和导出。
    选择您想要的新项目的所有依赖项。

  • 在新项目中,前往属性>Java构建路径>项目。现在添加原来的项目。


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?

解决方案

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.

这篇关于Eclipse,如何将一个项目的所有依赖项添加到另一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆