mavanagaiata

select maven profile based on git branch

三世轮回 提交于 2019-12-07 08:58:42
问题 Is it possible to select a profile based on what the current git branch is? For example, if you are in the master branch, it selects the 'production' profile. If it is the develop branch, it selects the 'development' profile. I found the mavanagaiata plugin which provides the mvngit.branch property but it can not be used in the <profiles> section. Is something like this possible? Or are there better ways? I want an easy way to automatically select the correct profile depending on the branch

Is there a single Git command to get the current tag, branch and commit?

你说的曾经没有我的故事 提交于 2019-12-03 05:25:59
问题 I'm currently using a collection of three commands to get the current tag, branch and the date and SHA1 of the most recent commit. git describe --always --tag git log -1 --format="%H%n%aD" git rev-parse --abbrev-ref HEAD Which will output something like: 1.2.3-5-gdeadbeef deadbeef3b8d90071c24f51ac8f26ce97a72727b Wed, 19 May 2010 09:12:34 +0200 master To be honest, I'm totally fine with this. But I'm using these commands from Maven and anyone who'd used Maven before, knows how much things like

Is there a single Git command to get the current tag, branch and commit?

喜你入骨 提交于 2019-12-02 19:53:48
I'm currently using a collection of three commands to get the current tag, branch and the date and SHA1 of the most recent commit. git describe --always --tag git log -1 --format="%H%n%aD" git rev-parse --abbrev-ref HEAD Which will output something like: 1.2.3-5-gdeadbeef deadbeef3b8d90071c24f51ac8f26ce97a72727b Wed, 19 May 2010 09:12:34 +0200 master To be honest, I'm totally fine with this. But I'm using these commands from Maven and anyone who'd used Maven before, knows how much things like external commands bloat the POM. I just want to slim down my pom.xml and maybe reduce execution time a

Deriving maven artifact version from git branch

时光总嘲笑我的痴心妄想 提交于 2019-11-28 15:17:48
We have a workflow requirement that essentially mean that we need to have the artifact version of a module externally defined from the current branch in git. I.e. if we are on the master branch in git, I need <version>master-...</version> and if we are on the bugfixX branch, I need <version>bugfixX-....</version> for the generated artifact for this pom.xml. I have previously found that https://github.com/koraktor/mavanagaiata can provide the SHA-1 hash as a property and it appears from the documentation that it can also provide the branch, so perhaps if it could be run early enough in the