Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions orm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,26 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.jboss.maven.plugins</groupId>
<artifactId>maven-injection-plugin</artifactId>
<configuration>
<bytecodeInjections>
<bytecodeInjection>
<expression>${project.version}</expression>
<targetMembers>
<methodBodyReturn>
<className>org.hibernate.tool.api.version.Version</className>
<methodName>versionString</methodName>
</methodBodyReturn>
</targetMembers>
</bytecodeInjection>
</bytecodeInjections>
</configuration>
</plugin>
</plugins>
</build>

</project>
13 changes: 11 additions & 2 deletions orm/src/main/java/org/hibernate/tool/api/version/Version.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
package org.hibernate.tool.api.version;

public interface Version {

final static String CURRENT_VERSION = "6.2.33-SNAPSHOT";

/**
* @deprecated Use {@link #versionString()} instead.
*/
@Deprecated
final static String CURRENT_VERSION = versionString();

static String versionString() {
// This implementation is replaced during the build with another one that returns the correct value.
return "UNKNOWN";
}

}