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

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

问题描述

我有兴趣使用 GitHub 上的项目 作为我项目中的依赖项.GitHub 项目有一个 pom 文件.我可以修改我的 pom 文件来使用这个项目吗?如果是这样,如何?如果没有,我的最佳行动方案是什么?

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?

推荐答案

不是我想的那样,AFAIK.

Not in the way I think you mean, AFAIK.

您可以使用 github 作为Maven仓库--这和直接引用一个项目不是一回事,它有一个pom文件只意味着它是一个Maven项目.

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天全站免登陆