File tree Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Expand file tree Collapse file tree 2 files changed +28
-7
lines changed Original file line number Diff line number Diff line change 4343 <project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
4444 <java .target>1.8</java .target>
4545 <!-- <git-commit-id-version>2.2.5</git-commit-id-version> -->
46- <git-commit-id-version >3.0.0-SNAPSHOT </git-commit-id-version >
46+ <git-commit-id-version >3.0.0</git-commit-id-version >
4747 <sonar .projectVersion>${project.version} -${git.branch} </sonar .projectVersion>
4848 </properties >
4949
107107 <configuration >
108108 <prefix >git</prefix >
109109 <skipPoms >false</skipPoms >
110- <verbose >true </verbose >
110+ <verbose >false </verbose >
111111 <dotGitDirectory >${project.basedir} /.git</dotGitDirectory >
112112 <injectAllReactorProjects >true</injectAllReactorProjects >
113113 <generateGitPropertiesFile >true</generateGitPropertiesFile >
114114 <evaluateOnCommit >HEAD</evaluateOnCommit >
115115 <generateGitPropertiesFilename >${project.build.outputDirectory} /git.properties</generateGitPropertiesFilename >
116116 <replacementProperties >
117117 <replacementProperty >
118- <property >sonar.projectVersion </property >
119- <token >^.*$</ token >
120- <value > ${project.version} - ${git.branch} </ value >
121- <regex >false</ regex >
118+ <property >git.commit.id.describe </property >
119+ <propertyOutputSuffix >withoutdirty</ propertyOutputSuffix >
120+ <token >^(.*?)(-dirty)?$</ token >
121+ <value >$1</ value >
122122 </replacementProperty >
123123 </replacementProperties >
124124 </configuration >
125125 </plugin >
126+ <plugin >
127+ <groupId >org.apache.maven.plugins</groupId >
128+ <artifactId >maven-antrun-plugin</artifactId >
129+ <version >1.8</version >
130+ <executions >
131+ <execution >
132+ <phase >package</phase >
133+ <configuration >
134+ <target >
135+ <echo >===========================================================================</echo >
136+ <echo >git.commit.id.describe: ${git.commit.id.describe} </echo >
137+ <echo >git.commit.id.describe.withoutdirty: ${git.commit.id.describe.withoutdirty} </echo >
138+ </target >
139+ </configuration >
140+ <goals >
141+ <goal >run</goal >
142+ </goals >
143+ </execution >
144+ </executions >
145+ </plugin >
126146 </plugins >
127147 </build >
128148 </profile >
Original file line number Diff line number Diff line change 2828 <!-- GIT COMMIT ID PLUGIN CONFIGURATION -->
2929<!--
3030
31- -->
31+
3232 <plugin>
3333 <groupId>org.apache.maven.plugins</groupId>
3434 <artifactId>maven-antrun-plugin</artifactId>
5050 </execution>
5151 </executions>
5252 </plugin>
53+ -->
5354 </plugins >
5455 </build >
5556 <profiles >
You can’t perform that action at this time.
0 commit comments