jitpack.io — github.com
Now you can import a Java library from a GitHub repo using JitPack.
In your pom.xml:
First Add repository:
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
Second Add dependency:
<dependency>
<groupId>com.github.User</groupId>
<artifactId>Repo name</artifactId>
<version>Release tag</version>
</dependency>
Note : for release tag
Before we can use release tag as a version in dependency, we have to create release tag first.
$ git tag -a 0.0.1-SNAPSHOT -m "commit message"
$ git push origin --tag
*READ MORE * : https://git-scm.com/book/en/v2/Git-Basics-Tagging
Example : I have a Repository : https://github.com/sovannarithcheav/artifact-demo.git, So the dependency should look like this :
<dependency>
<groupId>com.github.sovannarithcheav</groupId>
<artifactId>artifact-demo</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
It’s easy, right? 😜
READ MORE : loading-maven-dependencies-from-github
Top comments (0)