maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Max Spring <m2spr...@springdot.org>
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
branch?
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.
Thoughts?
-Max

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: http://maven.40175.n5.nabble.com/Is-it-possible-to-tie-current-git-branch-to-project-version-tp5543110p5543110.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message