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 43
43
<project .reporting.outputEncoding>UTF-8</project .reporting.outputEncoding>
44
44
<java .target>1.8</java .target>
45
45
<!-- <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 >
47
47
<sonar .projectVersion>${project.version} -${git.branch} </sonar .projectVersion>
48
48
</properties >
49
49
107
107
<configuration >
108
108
<prefix >git</prefix >
109
109
<skipPoms >false</skipPoms >
110
- <verbose >true </verbose >
110
+ <verbose >false </verbose >
111
111
<dotGitDirectory >${project.basedir} /.git</dotGitDirectory >
112
112
<injectAllReactorProjects >true</injectAllReactorProjects >
113
113
<generateGitPropertiesFile >true</generateGitPropertiesFile >
114
114
<evaluateOnCommit >HEAD</evaluateOnCommit >
115
115
<generateGitPropertiesFilename >${project.build.outputDirectory} /git.properties</generateGitPropertiesFilename >
116
116
<replacementProperties >
117
117
<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 >
122
122
</replacementProperty >
123
123
</replacementProperties >
124
124
</configuration >
125
125
</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 >
126
146
</plugins >
127
147
</build >
128
148
</profile >
Original file line number Diff line number Diff line change 28
28
<!-- GIT COMMIT ID PLUGIN CONFIGURATION -->
29
29
<!--
30
30
31
- -->
31
+
32
32
<plugin>
33
33
<groupId>org.apache.maven.plugins</groupId>
34
34
<artifactId>maven-antrun-plugin</artifactId>
50
50
</execution>
51
51
</executions>
52
52
</plugin>
53
+ -->
53
54
</plugins >
54
55
</build >
55
56
<profiles >
You can’t perform that action at this time.
0 commit comments