-
Type: New Feature
-
Status: Open
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: Continuous Integration
-
Tags:
The maven-branch-extension features an interesting mapping between the Git branch and the Maven snapshot repository.
https://bitbucket.org/mattshelton/maven-branch-extension.git
Quoting the plugin documentation:
The version of the artifacts needs to be different when on a feature branch if all builds deploy to the same snapshot repository, otherwise builds will overwrite one another.
This Maven extension addresses the problem from the other direction. Instead of changing the version number when on a feature branch, we change the repository. Each feature is deployed into a subdirectory, based on their branch name, in a remote repository that is only for feature branches. There is no risk of artifacts being overwritten. Version numbers do not change. Branching and merging with Git stays simple (like it was meant to be!).
The extension gets the current Git branch and resolves a property in the URL of the repository so that artifacts can be stored and retrieved correctly. It also manages caching and fetching of artifacts to the local repository so that artifacts are taken from the feature branch repository, if they exist, when working from a feature branch.
An extension is needed to handle the Git branch and URL evaluation because Maven repositories are evaluated and created before the Maven lifecycle starts. Therefore it is too late to handle this with a normal plugin.
There may be some limitations due to the use of Nexus. Thus, this ticket will wait for the deployment of Artifactory for its easy remote management.