HHH-3978 - Expose Hibernate version via non-compile-time constant expression

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@16868 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Steve Ebersole 2009-06-22 21:21:25 +00:00
parent 53b2a9f118
commit 2b1ef56ae2
2 changed files with 37 additions and 4 deletions

View File

@ -0,0 +1,35 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* Copyright (c) 2009, Red Hat Middleware LLC or third-party contributors as
* indicated by the @author tags or express copyright attribution
* statements applied by the authors. All third-party contributions are
* distributed under license by Red Hat Middleware LLC.
*
* This copyrighted material is made available to anyone wishing to use, modify,
* copy, or redistribute it subject to the terms and conditions of the GNU
* Lesser General Public License, as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
* for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this distribution; if not, write to:
* Free Software Foundation, Inc.
* 51 Franklin Street, Fifth Floor
* Boston, MA 02110-1301 USA
*/
package org.hibernate;
/**
* Information about the Hibernate version.
*
* @author Steve Ebersole
*/
public class Version {
public static String getVersionString() {
return "3.5.0-SNAPSHOT";
}
}

View File

@ -38,6 +38,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.hibernate.HibernateException;
import org.hibernate.Version;
import org.hibernate.bytecode.BytecodeProvider;
import org.hibernate.util.ConfigHelper;
import org.hibernate.util.PropertiesHelper;
@ -175,9 +176,6 @@ import org.hibernate.util.PropertiesHelper;
* @author Gavin King
*/
public final class Environment {
public static final String VERSION = "3.3.0.GA";
/**
* <tt>ConnectionProvider</tt> implementor to use when obtaining connections
*/
@ -557,7 +555,7 @@ public final class Environment {
static {
log.info("Hibernate " + VERSION);
log.info( "Hibernate " + Version.getVersionString() );
RENAMED_PROPERTIES.put( "hibernate.cglib.use_reflection_optimizer", USE_REFLECTION_OPTIMIZER );