File tree Expand file tree Collapse file tree 3 files changed +32
-1
lines changed
src/main/java/org/hibernate/validator/internal/util Expand file tree Collapse file tree 3 files changed +32
-1
lines changed Original file line number Diff line number Diff line change 216216 </testResource >
217217 </testResources >
218218 <plugins >
219+ <plugin >
220+ <groupId >org.jboss.maven.plugins</groupId >
221+ <artifactId >maven-injection-plugin</artifactId >
222+ <configuration >
223+ <bytecodeInjections >
224+ <bytecodeInjection >
225+ <expression >${project.version} </expression >
226+ <targetMembers >
227+ <methodBodyReturn >
228+ <className >org.hibernate.validator.internal.util.Version</className >
229+ <methodName >getVersionString</methodName >
230+ </methodBodyReturn >
231+ </targetMembers >
232+ </bytecodeInjection >
233+ </bytecodeInjections >
234+ </configuration >
235+ </plugin >
219236 <plugin >
220237 <artifactId >maven-compiler-plugin</artifactId >
221238 <executions >
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ public final class Version {
1919 }
2020
2121 public static String getVersionString () {
22- return Version . class . getPackage (). getImplementationVersion () ;
22+ return "UNKNOWN" ;
2323 }
2424
2525 public static void touch () {
Original file line number Diff line number Diff line change 269269 <version .spotless-maven-plugin>2.43.0</version .spotless-maven-plugin>
270270 <version .jacoco.plugin>0.8.12</version .jacoco.plugin>
271271 <version .sonar.plugin>5.0.0.4389</version .sonar.plugin>
272+ <version .maven.injection.plugin>1.0.2</version .maven.injection.plugin>
272273
273274 <!-- Forbidden API related properties -->
274275 <forbiddenapis-junit .path>forbidden-junit.txt</forbiddenapis-junit .path>
15871588 <artifactId >sonar-maven-plugin</artifactId >
15881589 <version >${version.sonar.plugin} </version >
15891590 </plugin >
1591+ <plugin >
1592+ <groupId >org.jboss.maven.plugins</groupId >
1593+ <artifactId >maven-injection-plugin</artifactId >
1594+ <version >${version.maven.injection.plugin} </version >
1595+ <executions >
1596+ <execution >
1597+ <phase >compile</phase >
1598+ <goals >
1599+ <goal >bytecode</goal >
1600+ </goals >
1601+ </execution >
1602+ </executions >
1603+ </plugin >
15901604 </plugins >
15911605 </pluginManagement >
15921606 </build >
You can’t perform that action at this time.
0 commit comments