Maven:如何导出带有源和依赖项的项目 [英] Maven: how to export project with sources and dependencies

查看:265
本文介绍了Maven:如何导出带有源和依赖项的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Maven项目,在回购和东西方面有依赖性.我想导出"具有所有依赖项的源,以便我可以在IDE中成功打开它,而无需在计算机上运行Maven.

I have Maven project with dependencies in repo and stuff. I want to "export" its sources with all dependencies so that I can successfully open it in IDE without Maven running on a machine.

将项目打包到war文件中时,它具有所有依赖项.

When packaging project into war file, it has all dependencies packed with it.

所以我想将所有依赖项以及我的源代码收集在一个地方,可以使用IDE(Eclipse或IDEA)打开所有检测到的库吗?

So I want to have all that dependencies plus my sources gathered in one place, which can be opened with IDE (Eclipse or IDEA) all those libraries detected?

推荐答案

尝试以目标 PS.
您是否了解Maven和IDE的集成(对于
Eclipse p.e.)? Maven可以为特定的IDE生成项目,并将所有相关的jar包含为变量(指向本地存储库中的这些jar),因此无需使用复制依赖项作为子文件夹.

PS.
Are you aware of maven and IDE integration (for Eclipse p.e.)? Maven can generate project for particular IDE and include all dependent jars as variables (pointing to these jars in local repository), so there is no need to use copy dependecies to subfolder.

这篇关于Maven:如何导出带有源和依赖项的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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