When I using maven-git-commit-id-plugin,I want use ${git.commit.id.abbrev} in my pom.xml.
The code is looks like thie:

The name of war is "xxx-0.0.1-${git.commit.id.abbrev}-20151126222413.war".
You can see,the value of ${git.commit.id.abbrev} is not replaced.
But it had been replaced in the "git.properties".
I don't know why and I tried to many ways,also asked google,but I'm faild.
Can anyone help me?
Thanks.
Hi @lecchi,
what you need to set is
<!-- @since 2.1.4 -->
<!--
Tell maven-git-commit-id to inject the git properties into all reactor projects not just the current one.
For details about why you might want to skip this, read this issue: https://github.com/ktoso/maven-git-commit-id-plugin/pull/65
The property is set to ``false`` by default to prevent the overriding of properties that may be unrelated to the project.
-->
<injectAllReactorProjects>true</injectAllReactorProjects>
This property is set to false by default.
The reason for this can be found in https://github.com/ktoso/maven-git-commit-id-plugin/pull/65 and https://github.com/ktoso/maven-git-commit-id-plugin/issues/108.
Hope this helps. Please let me know if you have further questions regarding this issue.
Thanks,
Hi @TheSnoozer ,
It can help me,Thank you so much!
=.=
Hi @lecchi,
nice. great to hear that this solved the problem :-)
There was a pretty big change from version 2.1.12 -> 2.1.13 where the default changed from true to false. 10c338f3fea963692d8fe0228cde25a64caa0517. Would be good to document it more clearly.
Well this
https://github.com/ktoso/maven-git-commit-id-plugin/issues/226#issuecomment-160397485
is from the readme. Where else should we put it?
For me it doesn't inject it into the current project anymore either. Is this intended? If so, the wording confused me a bit, but maybe that's just me.
It might also be good to note somewhere that version 2.1.13 made a backwards incompatible change. It took me a while to figure out what the problem was.
aw lol, why did it is not true on the README.md example?
<finalName>friday-watchdog-${version}-${git.commit.id.abbrev}</finalName>
<plugin>
<groupId>pl.project13.maven</groupId>
<artifactId>git-commit-id-plugin</artifactId>
<version>2.2.0</version>
<executions>
<execution>
<goals>
<goal>revision</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
<injectAllReactorProjects>true</injectAllReactorProjects>
<generateGitPropertiesFile>true</generateGitPropertiesFile>
</configuration>
</plugin>

But how to resolve this:

Most helpful comment
Hi @lecchi,
what you need to set is
This property is set to
falseby default.The reason for this can be found in https://github.com/ktoso/maven-git-commit-id-plugin/pull/65 and https://github.com/ktoso/maven-git-commit-id-plugin/issues/108.
Hope this helps. Please let me know if you have further questions regarding this issue.
Thanks,