This repository contains no code. It only contains the parent project object model (POM) files we use across all of our software.
QBiC relies on Liferay and Vaadin for its front-end and including these dependencies every single time in every portlet is a time-consuming task. Using maven parent POM files enables organizations to define dependencies in a single POM file from which other modules (artifacts in maven lingo) can derive.
The hierarchy of the parent POMs reflects how QBiC structures its software:
- All QBiC software modules belong to a parent organization (i.e.,
groupId=life.qbic)./pom.xmlis the parent POM for QBiC's java-based solutions. - Command-line interface (CLI) tools require parsing arguments. This dependency is included in
/cli/pom.xml. This is the same for artifacts of typeserviceandgui. - Libraries depending on portal technlogies such as Liferay (e.g., the already deprecated
liferayandvaadinutls) use/portal/pom.xmlas a parent POM. - Vaadin portlets use
/portal/portlet/pom.xmlas a parent POM.
parent-poms
├── cli
│ └── pom.xml
├── portal
│ ├── pom.xml
│ └── portlet
│ └── pom.xml
└── pom.xml
Since these parent POMs have dependencies between them, the cleanest way to manage releases is to use the same version for each of the POMs. Releasing the parent POMs is as simple as releasing other Maven artifacts. The first thing you need to do is to merge all changes into the master branch:
git pullgit checkout mastergit merge development
At this point, the HEAD of the master and development branches are identical. Update each of the parent POMs and the reference to their parents, as shown in this example:
| File | Before (snapshot version) | After (release version) |
|---|---|---|
pom.xml |
project/version = 1.2.0-SNAPSHOT |
project/version = 1.2.0 |
cli/pom.xml |
project/version = 1.2.0-SNAPSHOTproject/parent/version = 1.2.0-SNAPSHOT |
project/version = 1.2.0project/parent/version = 1.2.0 |
portal/pom.xml |
project/version = 1.2.0-SNAPSHOTproject/parent/version = 1.2.0-SNAPSHOT |
project/version = 1.2.0project/parent/version = 1.2.0 |
portal/portlet/pom.xml |
project/version = 1.2.0-SNAPSHOTproject/parent/version = 1.2.0-SNAPSHOT |
project/version = 1.2.0project/parent/version = 1.2.0 |
Here is a simplified version that you can run on your computer to install these POMs in your local Maven repository:
mvn install && mvn --file cli/pom.xml install && mvn --file portal/pom.xml install && mvn --file portal/portlet/pom.xml installOnce everything looks fine, stage, commit and push your changes:
git add .git commit -m "Release version 1.2.0"git push
Switch to the development branch (git checkout development) and bump the snapshot version:
| File | Before (snapshot version) | After (release version) |
|---|---|---|
pom.xml |
project/version = 1.2.0-SNAPSHOT |
project/version = 1.3.0-SNAPSHOT |
cli/pom.xml |
project/version = 1.2.0-SNAPSHOTproject/parent/version = 1.2.0-SNAPSHOT |
project/version = 1.3.0-SNAPSHOTproject/parent/version = 1.3.0-SNAPSHOT |
portal/pom.xml |
project/version = 1.2.0-SNAPSHOTproject/parent/version = 1.2.0-SNAPSHOT |
project/version = 1.3.0-SNAPSHOTproject/parent/version = 1.3.0-SNAPSHOT |
portal/portlet/pom.xml |
project/version = 1.2.0-SNAPSHOTproject/parent/version = 1.2.0-SNAPSHOT |
project/version = 1.3.0-SNAPSHOTproject/parent/version = 1.3.0-SNAPSHOT |
And, again, stage, commit and push your changes (remember that you are on the development branch):
git add .git commit -m "Post-release version bump to 1.3.0-SNAPSHOT"git push