我可以直接在Maven中使用GitHub项目吗? [英] Can I use a GitHub project directly in Maven?

查看:627
本文介绍了我可以直接在Maven中使用GitHub项目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有兴趣在我的项目中使用 GitHub上的项目作为依赖项。 GitHub项目有一个 pom 文件。我可以修改我的 pom 文件以使用此项目吗?如果是这样,怎么样?如果没有,我的最佳做法是什么?

>

您可以使用 github作为Maven仓库 - 这与直接引用项目并不相同,它有一个pom文件只表示它是Maven项目。



如果项目在中央库或其他仓库中不可用,那么最好的办法可能是克隆它,构建它,然后在本地安装。您应该确认它在其他地方确实无法使用。


I am interested in using a project on GitHub as a dependency in my project. The GitHub project has a pom file. Can I modify my pom file to use this project? If so, how? If not, what is my best course of action?

解决方案

Not in the way I think you mean, AFAIK.

You can use github as a Maven repository--this is not the same thing as directly referencing a project, and that it has a pom file means only that it's a Maven project.

If the project is not available in the central, or other, repository, your best bet may be to clone it, build it, and install it locally. You should confirm that it's truly not available elsewhere.

这篇关于我可以直接在Maven中使用GitHub项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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