@@ -258,6 +258,7 @@ Now you just have to include such a properties file in your project under `/src/
258258
259259```
260260git.branch=${git.branch}
261+ git.dirty=${git.dirty}
261262git.commit.tags=${git.tags}
262263
263264git.commit.id.describe=${git.commit.id.describe}
@@ -290,6 +291,7 @@ Start out with with adding the above steps to your project, next paste this **gi
290291
291292 <bean name =" gitRepositoryInformation" class =" pl.project13.maven.example.git.GitRepositoryState" >
292293 <property name =" branch" value =" ${git.branch}" />
294+ <property name =" dirty" value =" ${git.dirty}" />
293295 <property name =" tags" value =" ${git.tags}" />
294296 <property name =" describe" value =" ${git.commit.id.describe}" />
295297 <property name =" commitId" value =" ${git.commit.id}" />
@@ -321,7 +323,8 @@ import org.codehaus.jackson.annotate.JsonWriteNullProperties;
321323@JsonWriteNullProperties (true )
322324public class GitRepositoryState {
323325 String branch; // =${git.branch}
324- String branch; // =${git.tags} // comma separated tag names
326+ String dirty; // =${git.dirty}
327+ String tags; // =${git.tags} // comma separated tag names
325328 String describe; // =${git.commit.id.describe}
326329 String shortDescribe; // =${git.commit.id.describe-short}
327330 String commitId; // =${git.commit.id}
@@ -374,6 +377,7 @@ In the end *this is what this service would return*:
374377``` json
375378 {
376379 "branch" : " testing-maven-git-plugin" ,
380+ "dirty" : " false" ,
377381 "tags" : " v2.1.11,testing" ,
378382 "describe" : " v2.1.0-2-g2346463" ,
379383 "describeShort" : " v2.1.0-2" ,
@@ -439,6 +443,7 @@ You'd have to add such an constructor to your GitRepositoryState bean:
439443public GitRepositoryState(Properties properties)
440444{
441445 this . branch = properties. get(" git.branch" ). toString();
446+ this . dirty = properties. get(" git.dirty" ). toString();
442447 this . tags = properties. get(" git.tags" ). toString();
443448 this . describe = properties. get(" git.commit.id.describe" ). toString();
444449 this . describeShort = properties. get(" git.commit.id.describe-short" ). toString();
@@ -612,5 +617,3 @@ The best way to ask for features / improvements is [via the Issues section on gi
612617and maybe someone else has some idea or would like to upvote your issue.
613618
614619In all other cases, feel free to contact me by sending an email to ` konrad.malawski@java.pl ` , I'll definitely write back. :-)
615-
616- [ ![ Bitdeli Badge] ( https://d2weczhvl823v0.cloudfront.net/ktoso/maven-git-commit-id-plugin/trend.png )] ( https://bitdeli.com/free " Bitdeli Badge ")
0 commit comments