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 86
86
</dependency >
87
87
</dependencies >
88
88
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
+
89
111
</project >
Original file line number Diff line number Diff line change 4
4
5
5
final public class Version {
6
6
7
- public static final String VERSION = "5.3.37-SNAPSHOT" ;
8
-
9
7
private static final Version instance = new Version ();
10
8
9
+ public static final String VERSION = instance .versionString ();
10
+
11
11
private static Logger log = Logger .getLogger ( Version .class .getName () );
12
12
13
13
static {
@@ -22,6 +22,11 @@ public String getVersion() {
22
22
return VERSION ;
23
23
}
24
24
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
+
25
30
public static Version getDefault () {
26
31
return instance ;
27
32
}
You can’t perform that action at this time.
0 commit comments