2

I have in the past successfully used JitPack to import dependencies directly from their Git repos, having them built on the fly if necessary. Just add JitPack as a repository and replace the group ID with something Ă  la com.gitlab.username (reverse DNS name of the git provider followed by username), the artifact ID with the repo name and the version with a valid git ref.

All of the repositories I have used, however, contain just the code for a single jar, with one single pom.xml in the root dir.

Now I am wondering if and how JitPack can handle more complex repos—specifically, a repo which has a back-end library and a front-end app in separate subdirectories.

The repo has two subdirs, frontend and backend, each with their own pom.xml. The pom.xml in the root dir essentially tells Maven to build the two subdirs. (Or maybe it uses Gradle and has build.gradle in place of pom.xml.)

Now I would like to include the library in backend in a different project. Can I do this with JitPack? If so, since the group and artifact ID will give JitPack just the repo, how can I tell it to build a particular subdir of that repo?

user149408
  • 5,385
  • 4
  • 33
  • 69

0 Answers0