Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should a multi-module project to split into separate repository trees?

Tags:

java

svn

osgi

Currently we have a project with a standard subversion repository layout of:

./trunk
./branches
./tags

However, as we're moving down the road of OSGi and a modular project, we've ended up with:

./trunk/bundle/main
./trunk/bundle/modulea
./trunk/bundle/moduleb ./tags/bundle/main-1.0.0
./tags/bundle/main-1.0.1
./tags/bundle/modulea-1.0.0

The 'build' is still quite monolithic in that it builds all modules in sequence, though I'm starting to wonder if we should refactor the build/repository to something more like:

./bundle/main/trunk
./bundle/main/tags/main-1.0.0
./bundle/main/tags/main-1.0.1
./bundle/modulea/trunk
./bundle/modulea/tags/modulea-1.0.0

In this pattern I would imagine each module building itself, and storing its binary in a repository (maven, ivy, or another path of the subversion repository itself).

Are there guidelines or 'best-practices' over project layouts once one goes modular?

like image 758
Mark Derricutt Avatar asked Aug 18 '08 09:08

Mark Derricutt


People also ask

What is the use of multi-module project in Maven?

A multi-module project is built from an aggregator POM that manages a group of submodules. In most cases, the aggregator is located in the project's root directory and must have packaging of type pom. The submodules are regular Maven projects, and they can be built separately or through the aggregator POM.

What is module split up in project?

This project is divided into modules. Instead of putting everything into one document, each specific task is put into its own document, and the result is assembled at the end.

Why do we need multi-module projects?

Advantages of a Multi-Module ProjectIt provides a great ability to build all sub-modules only with a single command. We can run the build command from the parent module. While building the application, the build system takes care of the build order. Deployment of the applications gets very convenient and flexible.


1 Answers

The Subversion book contains two sections on this:

  • Repository Layout
  • Planning Your Repository Organization

A blog entry on the subject: "Subversion Repository Layout"

The short answer, though: while your mileage will vary (every situation is individual), your /bundle/<project>/(trunk|tags|branches) scheme is rather common and will likely work well for you.

like image 115
Sören Kuklau Avatar answered Nov 08 '22 07:11

Sören Kuklau