[hibernate-dev] Identify Hibernate version

Dmitry Geraskov dgeraskov at exadel.com
Tue Apr 10 11:03:31 EDT 2012


Thanks, Hardy!

Dmitry

10.04.2012 17:59, Hardy Ferentschik написал:
> Hi Dmitry,
>
> you are basically looking at the right place. For any released version of Hibernate Version#getVersionString()
> will return the release tag of the Hibernate version.
>
> If you are compiling the HEAD of the master branch the version you will see in the log is 4.1.0-SNAPSHOT.
> We are using bye code manipulation to inject the version at compile time. You find the code which does it
> under buildSrc of the checkout. It is a gradle plugin (InjectionPlugin).
>
> The version itself comes from build.gradle where the group- and artifact-if together with the version are defined.
> Something like:
>
> subprojects { subProject ->
>      // ...
>      group = 'org.hibernate'
>      version = '4.1.0-SNAPSHOT'
>     // …
>
> Hope this helps,
> Hardy
>
>
> On Apr 10, 2012, at 4:40 PM, Dmitry Geraskov wrote:
>
>> Hi, guys,
>>
>> could you please tell me how to identify hibernate version used at run time.
>> I expected to get it from  org.hibernateVersion , but the code is:
>>
>> public class Version {
>>      public static String getVersionString() {
>>          return "[WORKING]";
>>      }
>> ...
>> }
>>
>> Could you please help?
>>
>> Thanks,
>> Dmitry Geraskov
>> _______________________________________________
>> hibernate-dev mailing list
>> hibernate-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev



More information about the hibernate-dev mailing list