diff --git a/pom.xml b/pom.xml index 63fd69111b..5ef2305504 100644 --- a/pom.xml +++ b/pom.xml @@ -232,6 +232,23 @@ + + org.jboss.maven.plugins + maven-injection-plugin + + + + ${project.version} + + + org.hibernate.tool.Version + versionString + + + + + + org.apache.maven.plugins maven-surefire-plugin diff --git a/src/java/org/hibernate/tool/Version.java b/src/java/org/hibernate/tool/Version.java index c5cc59d574..af8402f302 100644 --- a/src/java/org/hibernate/tool/Version.java +++ b/src/java/org/hibernate/tool/Version.java @@ -5,9 +5,9 @@ final public class Version { - public static final String VERSION = "4.0.2-SNAPSHOT"; - private static final Version instance = new Version(); + + public static final String VERSION = instance.versionString(); private static Log log = LogFactory.getLog( Version.class ); @@ -22,6 +22,11 @@ private Version() { public String getVersion() { return VERSION; } + + public String versionString() { + // This implementation is replaced during the build with another one that returns the correct value. + return "UNKNOWN"; + } public static Version getDefault() { return instance;