diff --git a/pom.xml b/pom.xml index 4fb9205a6f..0e11e0d97a 100644 --- a/pom.xml +++ b/pom.xml @@ -200,6 +200,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 8117bac637..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 = "3.5.4-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;