Can I use a GitHub project directly in Maven?

后端 未结 2 1314
一向
一向 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:30

    Try jitpack, you just need to add the dependency, jitpack will build others for you.

    From home page:

    jitpack
    Easy to use package repository for Gradle and Maven projects
    JitPack builds GitHub projects on demand and provides ready-to-use packages

    HOW

    1. Add repository first
    
        jitpack.io
        https://jitpack.io
    
    
    1. Add dependency
    
        com.github.User
        Repo name
        Release tag
    
    

    TIPS:

    You can see its build log too https://jitpack.io/com/github/NanoHttpd/nanohttpd/Release-2.1.0/build.log

提交回复
热议问题