jgitver-maven-plugin
jgitver-maven-plugin copied to clipboard
"-g" prefix option not available in maven plugin
Before submitting an issue I have first:
- [x] searched for similar already existing issue
Found completed issue in the underlying library https://github.com/jgitver/jgitver/issues/24.
The functionality does not seem to be exposed in jgitver-maven-plugin.
Issue
version: 1.5.1
usage context:
- [x] maven command line: 3.6.0
Problem description:
- with
useGitCommitIdset totruethe generated name does not contain '-g' before the hash e.g. in repository one commit afterv0.0.1tag:- jgitver-maven-plugin produces
...-0.0.1-1-d1590b8f - sbt-git produces
...-0.0.1-1-gd1590b8
- jgitver-maven-plugin produces
Attempts:
- using
<useLongFormat>true</useLongFormat>in xml configuration fails with:
Element 'useLongFormat' does not have a match in class fr.brouillard.oss.jgitver.cfg.Configuration
- xsd does not contain "useLongFormat" or anything similar.
- GitHub search for
setUseLongFormatreturns no results injgitver-maven-plugin.
Hi ! If you still want this I made this PATTERN conf workaround to achive this result.
<configuration xmlns="http://jgitver.github.io/maven/configuration/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.1.0 https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_1_0.xsd">
<strategy>PATTERN</strategy>
<versionPattern>${v}${-~meta.COMMIT_DISTANCE}${-g~meta.GIT_SHA1_8}</versionPattern>
</configuration>