HHH-13704 Make javassist a compile time dependency again

This commit revert some of the changes so that we can release it in a micro
  without breaking application using Javassist.

  In the next minor it should be reverted.
This commit is contained in:
Davide D'Alto 2019-12-13 11:29:40 +00:00
parent 130945f70f
commit c4dc9b0d25
5 changed files with 7 additions and 34 deletions

View File

@ -51,7 +51,8 @@ configurations {
dependencies { dependencies {
compile( libraries.jpa ) compile( libraries.jpa )
provided( libraries.javassist ) // This can now be made provided
compile( libraries.javassist )
// Could be made optional? // Could be made optional?
compile( libraries.byteBuddy ) compile( libraries.byteBuddy )
compile( libraries.antlr ) compile( libraries.antlr )

View File

@ -1,26 +0,0 @@
/*
* Hibernate, Relational Persistence for Idiomatic Java
*
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or http://www.gnu.org/licenses/lgpl-2.1.html
*/
package org.hibernate.optional.javassist;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import static org.junit.Assert.assertNull;
public class OptionalJavassistDependencyTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test
public void shouldNotBeOnTheClasspath() throws Exception {
thrown.expect( ClassNotFoundException.class );
Class<?> aClass = getClass().getClassLoader().loadClass( "javassist.util.proxy.Proxy" );
}
}

View File

@ -11,7 +11,11 @@ apply plugin: 'hibernate-matrix-testing'
description = 'Hibernate\'s entity version (audit/history) support' description = 'Hibernate\'s entity version (audit/history) support'
dependencies { dependencies {
compile( project( ':hibernate-core' ) ) compile( project( ':hibernate-core' ) ) {
// Exclude access to this to avoid future use.
exclude group: "org.javassist", module: "javassist"
}
provided( libraries.ant ) provided( libraries.ant )
annotationProcessor( project( ':hibernate-jpamodelgen' ) ) annotationProcessor( project( ':hibernate-jpamodelgen' ) )

View File

@ -7,6 +7,5 @@
<features name="hibernate-osgi-testing-repository" xmlns='http://karaf.apache.org/xmlns/features/v1.2.0'> <features name="hibernate-osgi-testing-repository" xmlns='http://karaf.apache.org/xmlns/features/v1.2.0'>
<feature name='hibernate-osgi-testing' version='5.0.0-SNAPSHOT'> <feature name='hibernate-osgi-testing' version='5.0.0-SNAPSHOT'>
<bundle>mvn:com.h2database/h2/1.3.170</bundle> <bundle>mvn:com.h2database/h2/1.3.170</bundle>
<bundle>mvn:org.javassist/javassist/3.24.0-GA</bundle>
</feature> </feature>
</features> </features>

View File

@ -9,11 +9,6 @@ earlier versions, see any other pertinent migration guides as well.
== Known changes == Known changes
=== Optional Javassist
Javassist is not a transitive dependency of Hibernate ORM core anymore. If you are using it in your
project you will have to make sure to include it in the classpath of your application.
=== Overriding Delayed Identity Insert Behavior === Overriding Delayed Identity Insert Behavior
In Hibernate 5.3, we added support for `DelayedPostInsertIdentifier` behavior to be influenced based on the In Hibernate 5.3, we added support for `DelayedPostInsertIdentifier` behavior to be influenced based on the