maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Max Spring <>
Subject using per-branch group repo [Was: Is it possible to tie current git branch to project version?]
Date Wed, 23 May 2012 00:31:22 GMT
Has someone tried to approach this problem by using different group repositories, one for each
In particular when using a repository manager like Nexus, one could have for each SCM branch
a snapshot repo, a release repo and a repo group combining them (plus other third party repos).
I could imagine a Maven plugin setting the repository URLs accordingly.
In a CI build one would have a private local repository, of course.
Developers would need to be careful, though, when working with multiple branches on the same
local repository.  Or maybe the local repo would be per-branch, too?
When pulling a new branch, the repositories on the repository manager could be created automatically.

On 03/06/2012 08:01 PM, Seth Call wrote:
> Hi there,
> I've seen indication when searching the internet that it isn't possible to
> put variables in<version>  of a project (unless those variables are
> hardcoded<properties>  or provided at the command line), but I thought I'd
> ask the list ...
> Say there was a plugin that would invoke 'git branch' to determine the
> current branch, and to then make that available to the project as a
> variable; call it ${branch}.   I'd like to use this variable then in the
> version tag:
> <project>
> <groupId>blah</groupId>
> <artifactId>blah</artifactId>
> <version>${branch}-SNAPSHOT</version>
> </project>
> The reason I want to do this is that I'm realizing, for our internal-only
> code projects, that a branch is always synonymous with a version of a
> project, and ideally the act of being of switching branches would be all it
> takes to switch your maven project's version.
> Is this possible if I were to make a maven plugin?
> Thanks!
> Seth
> --
> View this message in context:
> Sent from the Maven - Users mailing list archive at
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message