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: [email protected]
For additional commands, e-mail: [email protected]