File tree Expand file tree Collapse file tree 2 files changed +29
-2
lines changed
src/main/java/org/hibernate/tool Expand file tree Collapse file tree 2 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 8686 </dependency >
8787 </dependencies >
8888
89+ <build >
90+ <plugins >
91+ <plugin >
92+ <groupId >org.jboss.maven.plugins</groupId >
93+ <artifactId >maven-injection-plugin</artifactId >
94+ <configuration >
95+ <bytecodeInjections >
96+ <bytecodeInjection >
97+ <expression >${project.version} </expression >
98+ <targetMembers >
99+ <methodBodyReturn >
100+ <className >org.hibernate.tool.Version</className >
101+ <methodName >versionString</methodName >
102+ </methodBodyReturn >
103+ </targetMembers >
104+ </bytecodeInjection >
105+ </bytecodeInjections >
106+ </configuration >
107+ </plugin >
108+ </plugins >
109+ </build >
110+
89111</project >
Original file line number Diff line number Diff line change 44
55final public class Version {
66
7- public static final String VERSION = "5.5.10-SNAPSHOT" ;
8-
97 private static final Version instance = new Version ();
108
9+ public static final String VERSION = instance .versionString ();
10+
1111 private static Logger log = Logger .getLogger ( Version .class .getName () );
1212
1313 static {
@@ -22,6 +22,11 @@ public String getVersion() {
2222 return VERSION ;
2323 }
2424
25+ public String versionString () {
26+ // This implementation is replaced during the build with another one that returns the correct value.
27+ return "UNKNOWN" ;
28+ }
29+
2530 public static Version getDefault () {
2631 return instance ;
2732 }
You can’t perform that action at this time.
0 commit comments