File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/java/org/hibernate/tool Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change 200200 </testResource >
201201 </testResources >
202202 <plugins >
203+ <plugin >
204+ <groupId >org.jboss.maven.plugins</groupId >
205+ <artifactId >maven-injection-plugin</artifactId >
206+ <configuration >
207+ <bytecodeInjections >
208+ <bytecodeInjection >
209+ <expression >${project.version} </expression >
210+ <targetMembers >
211+ <methodBodyReturn >
212+ <className >org.hibernate.tool.Version</className >
213+ <methodName >versionString</methodName >
214+ </methodBodyReturn >
215+ </targetMembers >
216+ </bytecodeInjection >
217+ </bytecodeInjections >
218+ </configuration >
219+ </plugin >
203220 <plugin >
204221 <groupId >org.apache.maven.plugins</groupId >
205222 <artifactId >maven-surefire-plugin</artifactId >
Original file line number Diff line number Diff line change 55
66final public class Version {
77
8- public static final String VERSION = "3.5.4-SNAPSHOT" ;
9-
108 private static final Version instance = new Version ();
9+
10+ public static final String VERSION = instance .versionString ();
1111
1212 private static Log log = LogFactory .getLog ( Version .class );
1313
@@ -22,6 +22,11 @@ private Version() {
2222 public String getVersion () {
2323 return VERSION ;
2424 }
25+
26+ public String versionString () {
27+ // This implementation is replaced during the build with another one that returns the correct value.
28+ return "UNKNOWN" ;
29+ }
2530
2631 public static Version getDefault () {
2732 return instance ;
You can’t perform that action at this time.
0 commit comments