0

I am maintaining big project with multiple modules (currently I maintain each module as separate GIT repo).

There is interdependency between these modules which creates 5 level dependency tree. Currently, I build each module(git repo) individually and manually copy JAR files to dependant modules(git REPOs).

Its difficult to maintain this dependency as every-time I make change to some git REPO, I have to propagate changes(JAR file) to all child REPOs in dependency tree. Those changes I have to propagate again to their child REPOs and so on till I reach leaf git REPOs

How typically big project handles this JAR dependencies in big project so that we don't have to manually copy JAR files to dependent REPOs

mzlo
  • 333
  • 1
  • 4
  • 15
  • 1
    Usually people add some projects to a dependency to a big project using maven/gradle/ any build tool. Or you can create a one big project - module with submodules using maven or gradle and you will get all your dependencies in the result of build of root project/module – Oleksandr Zaiats Feb 15 '17 at 23:15

1 Answers1

0

Usually, you manage your jars (with different versions) in an artifact repository like Nexus or Artifactory. You do not put jars into Git repositories.

If you build your project with Maven or Gradle, you can deploy the result of your build with a version number to the Nexus/Artifactory. Then other projects can easily depend on them, without manual copying. Just add the dependencies with the correct versions to the gradle or Maven build file and the build tool will grab the jars from the Nexus/Artifactory.

In Maven, you could also build multi-module projects which contain subprojects that could be build together.

J Fabian Meier
  • 33,516
  • 10
  • 64
  • 142