Maven versioning parallel development process
I work on a project using SVN with the usual trunk and branches. I have nexus with two repositories with two different policies "Release" and "Snapshot". This project produces artifacts that are used from other projects in my company. Let's say at moment we are on version 1.0.1 so on Nexus in the Release repository I have artifacts-1.0.1.jar
When a new feature is required I perform the following steps:
- Create a new branch from trunk let's say feature_1 from trunk so I now have branches/feature_1
- Increase the version to 1.0.2-SNAPSHOT and on Nexus I’ll have 1.0.2-SNAPSHOT.jar
Before 1.0.2-SNAPSHOT is released, another feature is required and I'll repeat the previous steps:
- Create a new branch from trunk let's say feature_1 from trunk so I now have branches/feature_2
- Increase the version to 1.0.3-SNAPSHOT and on Nexus I’ll have 1.0.2-SNAPSHOT.jar and 1.0.3-SNAPSHOT.jar
At some stage I need feature_2 to go live and I perform the following steps:
- Merge feature_2 in trunk
- Deploy in prod and push the artifacts 1.0.3.jar to Nexus.
The process works fine if I didn't have a feature_1 that still in progress and has the version 1.0.2-SNAPSHOT.jar while the release version is 1.0.3.
Unfortunately the feature branches are not released sequentially. How can I manage versioning in this case? What am I missing?
Should I force the team working on 1.0.2-SNAPSHOT (feature_1) to merge trunk down to branches/feature_1 and increase the version from 1.0.2-SNAPSHOT to 1.0.4-SNAPSHOT?
It doesn't sound right to me.