我有兴趣在我的项目中使用 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项目吗?
发布评论