简体   繁体   中英

Modular Maven projects and multiple Git repositories

I have separated the code that I have been making up to this point from a single maven project to multiple maven projects. The projects that I have ended up with can be used by future projects, they are pretty much libraries. I have been using a single Git repository up to this point since everything was in one project. However after the modularisation I wonder if I should create a Git repository for each Maven project. I think that is the correct way to do it, but I would like to hear what others think of that. Since the projects could work as standalone components they also deserve their own Git repository? Another option would be to develop all the projects in the same Git repository for the project that I currently work on.

Since the projects could work as standalone components they also deserve their own Git repository?

This is actually one of the main criteria for defining a git repo, which will represent a coherent group of file with its own independent history (including its set of branches and tags)

This has the additional advantage that some other project depending on some but not all your components won't have to clone the full unique git repo (which would contain everything , included components not needed).
That other project can clone and benefit from the exact subset of components needed.

This is called the component approach, as opposed to the system approach .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM