Can I use a GitHub project directly in Maven?

后端 未结 2 1315
一向
一向 2020-11-28 22:52

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

2条回答
  •  盖世英雄少女心
    2020-11-28 23:29

    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.

提交回复
热议问题