From d16073f7ceb8f351b6a61d845be92a0833dc3b96 Mon Sep 17 00:00:00 2001 From: Steve Ebersole Date: Tue, 27 Jul 2021 19:38:44 -0500 Subject: [PATCH] remove dependency on hibernate-core tests from hibernate-envers --- .../jpa/test/TestingEntityManagerFactoryGenerator.java | 2 ++ .../query/NativeQueryResultTypeAutoDiscoveryTest.java | 2 +- .../jpa/cacheable/annotation/ConfigurationTest.java | 2 +- .../orm/test/jpa/cdi/NoCdiAvailableTestDelegate.java | 2 +- .../ConfigurationObjectSettingTest.java | 2 +- .../test/jpa/ejb3configuration/InterceptorTest.java | 3 +-- .../NamingStrategyConfigurationTest.java | 2 +- .../ejb3configuration/PersisterClassProviderTest.java | 2 +- .../ejb3configuration/SessionFactoryObserverTest.java | 2 +- .../id/IdentifierGeneratorStrategyProviderTest.java | 2 +- .../test/jpa/metamodel/MappedSuperclassType2Test.java | 2 +- .../jpa/transaction/TransactionCommitFailureTest.java | 3 +-- .../orm/test/schemaupdate/Hbm2ddlCreateOnlyTest.java | 2 +- hibernate-envers/hibernate-envers.gradle | 7 +------ .../test/envers/BaseEnversJPAFunctionalTestCase.java | 2 +- .../jta/JtaTransactionAfterCallbackTest.java | 6 ++---- .../envers/performance/AbstractEntityManagerTest.java | 2 +- .../orm/jakarta/JakartaDirectoryTransformation.java | 3 +++ .../orm/jakarta/JakartaJarTransformation.java | 3 +++ .../orm/jpa}/PersistenceUnitDescriptorAdapter.java | 6 +++--- .../testing/orm/jpa}/PersistenceUnitInfoAdapter.java | 10 +++++++--- .../testing/orm/jpa/PersistenceUnitInfoImpl.java | 6 ++++++ 22 files changed, 41 insertions(+), 32 deletions(-) rename {hibernate-core/src/test/java/org/hibernate/jpa/test => hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa}/PersistenceUnitDescriptorAdapter.java (94%) rename {hibernate-core/src/test/java/org/hibernate/jpa/test => hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa}/PersistenceUnitInfoAdapter.java (88%) diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/TestingEntityManagerFactoryGenerator.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/TestingEntityManagerFactoryGenerator.java index 435e96fab2..e9ddd7d4c8 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/TestingEntityManagerFactoryGenerator.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/TestingEntityManagerFactoryGenerator.java @@ -12,6 +12,8 @@ import java.util.Map; import org.hibernate.jpa.boot.spi.Bootstrap; import org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; + /** * @author Steve Ebersole */ diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryResultTypeAutoDiscoveryTest.java b/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryResultTypeAutoDiscoveryTest.java index 761250b894..246bb5ac92 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryResultTypeAutoDiscoveryTest.java +++ b/hibernate-core/src/test/java/org/hibernate/jpa/test/query/NativeQueryResultTypeAutoDiscoveryTest.java @@ -42,7 +42,7 @@ import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.type.AbstractSingleColumnStandardBasicType; import org.hibernate.type.descriptor.ValueBinder; import org.hibernate.type.descriptor.ValueExtractor; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cacheable/annotation/ConfigurationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cacheable/annotation/ConfigurationTest.java index 265ae3d1c5..36db0ff03a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cacheable/annotation/ConfigurationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cacheable/annotation/ConfigurationTest.java @@ -18,7 +18,7 @@ import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitInfoAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter; import org.hibernate.mapping.PersistentClass; import org.hibernate.testing.cache.CachingRegionFactory; import org.hibernate.testing.orm.junit.BaseUnitTest; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cdi/NoCdiAvailableTestDelegate.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cdi/NoCdiAvailableTestDelegate.java index 7e4c7e77aa..8beb47b752 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cdi/NoCdiAvailableTestDelegate.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/cdi/NoCdiAvailableTestDelegate.java @@ -12,7 +12,7 @@ import javax.persistence.EntityManagerFactory; import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.HibernatePersistenceProvider; -import org.hibernate.jpa.test.PersistenceUnitInfoAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter; /** * @author Steve Ebersole diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/ConfigurationObjectSettingTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/ConfigurationObjectSettingTest.java index aa909b2159..55e25667e5 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/ConfigurationObjectSettingTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/ConfigurationObjectSettingTest.java @@ -14,7 +14,7 @@ import org.hibernate.HibernateException; import org.hibernate.cfg.AvailableSettings; import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitInfoAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter; import org.hibernate.testing.orm.junit.BaseUnitTest; import org.junit.jupiter.api.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/InterceptorTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/InterceptorTest.java index ebe09e0fe2..1386708857 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/InterceptorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/InterceptorTest.java @@ -19,12 +19,11 @@ import org.hibernate.boot.SessionFactoryBuilder; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.registry.internal.StandardServiceRegistryImpl; import org.hibernate.cfg.Environment; -import org.hibernate.dialect.Dialect; import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.boot.spi.Bootstrap; import org.hibernate.jpa.test.Distributor; import org.hibernate.jpa.test.Item; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.jpa.test.SettingsGenerator; import org.hibernate.testing.orm.junit.DialectContext; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/NamingStrategyConfigurationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/NamingStrategyConfigurationTest.java index d6e20b767f..b8db321be7 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/NamingStrategyConfigurationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/NamingStrategyConfigurationTest.java @@ -13,7 +13,7 @@ import org.hibernate.cfg.AvailableSettings; import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl; import org.hibernate.jpa.boot.spi.Bootstrap; import org.hibernate.jpa.test.MyNamingStrategy; -import org.hibernate.jpa.test.PersistenceUnitInfoAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter; import org.hibernate.testing.orm.junit.BaseUnitTest; import org.junit.jupiter.api.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/PersisterClassProviderTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/PersisterClassProviderTest.java index 14ad4cc78e..749eb12497 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/PersisterClassProviderTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/PersisterClassProviderTest.java @@ -37,7 +37,7 @@ import org.hibernate.id.IdentifierGenerator; import org.hibernate.internal.FilterAliasGenerator; import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.jpa.test.SettingsGenerator; import org.hibernate.mapping.Collection; import org.hibernate.mapping.PersistentClass; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/SessionFactoryObserverTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/SessionFactoryObserverTest.java index 429e786496..138316d46d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/SessionFactoryObserverTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/SessionFactoryObserverTest.java @@ -15,7 +15,7 @@ import org.junit.jupiter.api.Test; import org.hibernate.SessionFactory; import org.hibernate.SessionFactoryObserver; -import org.hibernate.jpa.test.PersistenceUnitInfoAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter; import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.boot.spi.Bootstrap; import org.hibernate.jpa.boot.spi.EntityManagerFactoryBuilder; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/id/IdentifierGeneratorStrategyProviderTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/id/IdentifierGeneratorStrategyProviderTest.java index 9a64df4039..0251707908 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/id/IdentifierGeneratorStrategyProviderTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/ejb3configuration/id/IdentifierGeneratorStrategyProviderTest.java @@ -13,7 +13,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import org.hibernate.jpa.test.PersistenceUnitInfoAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitInfoAdapter; import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.boot.spi.Bootstrap; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/MappedSuperclassType2Test.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/MappedSuperclassType2Test.java index 00f41f3868..894a1389b6 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/MappedSuperclassType2Test.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/metamodel/MappedSuperclassType2Test.java @@ -15,7 +15,7 @@ import java.util.Map; import org.hibernate.cfg.AvailableSettings; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.testing.orm.junit.BaseUnitTest; import org.hibernate.testing.orm.junit.FailureExpected; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/transaction/TransactionCommitFailureTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/transaction/TransactionCommitFailureTest.java index c5c4a5c6b9..fdaad29b2d 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/transaction/TransactionCommitFailureTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/jpa/transaction/TransactionCommitFailureTest.java @@ -18,10 +18,9 @@ import javax.persistence.EntityManagerFactory; import javax.persistence.RollbackException; import org.hibernate.cfg.Environment; -import org.hibernate.dialect.Dialect; import org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.jpa.test.SettingsGenerator; import org.hibernate.testing.TestForIssue; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/Hbm2ddlCreateOnlyTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/Hbm2ddlCreateOnlyTest.java index 0e89657467..588f519b5c 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/Hbm2ddlCreateOnlyTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/Hbm2ddlCreateOnlyTest.java @@ -13,7 +13,7 @@ import org.hibernate.boot.internal.SessionFactoryOptionsBuilder; import org.hibernate.cfg.AvailableSettings; import org.hibernate.internal.CoreMessageLogger; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.orm.test.jpa.mapping.ColumnWithExplicitReferenceToPrimaryTableTest.AnEntity; import org.hibernate.testing.TestForIssue; import org.hibernate.testing.logger.LoggerInspectionRule; diff --git a/hibernate-envers/hibernate-envers.gradle b/hibernate-envers/hibernate-envers.gradle index 87defc0047..7b8922ff2d 100644 --- a/hibernate-envers/hibernate-envers.gradle +++ b/hibernate-envers/hibernate-envers.gradle @@ -11,11 +11,7 @@ apply from: rootProject.file( 'gradle/published-java-module.gradle' ) apply plugin: 'org.hibernate.matrix-test' dependencies { - api( project( ':hibernate-core' ) ) { - // Exclude access to this to avoid future use. - // todo (6.0) : this should no longer be transitive from core. Come back and verify this - exclude group: "org.javassist", module: "javassist" - } + api project( ':hibernate-core' ) implementation libraries.commons_annotations @@ -27,7 +23,6 @@ dependencies { annotationProcessor project( ':hibernate-jpamodelgen' ) testImplementation project( ':hibernate-testing' ) - testImplementation project( path: ':hibernate-core', configuration: 'tests' ) } sourceSets { diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/BaseEnversJPAFunctionalTestCase.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/BaseEnversJPAFunctionalTestCase.java index 836d490a53..93e02a0547 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/BaseEnversJPAFunctionalTestCase.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/BaseEnversJPAFunctionalTestCase.java @@ -30,7 +30,6 @@ import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl; import org.hibernate.jpa.boot.spi.Bootstrap; import org.hibernate.jpa.boot.spi.PersistenceUnitDescriptor; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; import org.hibernate.query.sqm.mutation.internal.idtable.GlobalTemporaryTableStrategy; import org.hibernate.query.sqm.mutation.internal.idtable.LocalTemporaryTableStrategy; @@ -39,6 +38,7 @@ import org.hibernate.testing.BeforeClassOnce; import org.hibernate.testing.jdbc.SharedDriverManagerConnectionProviderImpl; import org.hibernate.testing.jta.TestingJtaPlatformImpl; import org.hibernate.testing.junit4.Helper; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.testing.orm.junit.DialectContext; import org.junit.After; diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/jta/JtaTransactionAfterCallbackTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/jta/JtaTransactionAfterCallbackTest.java index 32011970e6..9f252f490b 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/jta/JtaTransactionAfterCallbackTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/integration/jta/JtaTransactionAfterCallbackTest.java @@ -31,8 +31,6 @@ import org.hibernate.testing.TestForIssue; import org.hibernate.testing.jta.TestingJtaBootstrap; import org.hibernate.testing.jta.TestingJtaPlatformImpl; -import org.hibernate.test.tm.JtaAfterCompletionTest; - import static org.hibernate.testing.junit4.ExtraAssertions.assertTyping; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -41,8 +39,8 @@ import static org.junit.Assert.assertTrue; /** * An envers specific quest that verifies the {@link AuditProcessManager} gets flushed. * - * There is a similar test called {@link JtaAfterCompletionTest} - * in hibernate-core which verifies that the callbacks fires. + * There is a similar to `org.hibernate.test.tm.JtaAfterCompletionTest` in hibernate-core + * which verifies that the callbacks fires. * * The premise behind this test is to verify that when a JTA transaction is aborted by * Arjuna's reaper thread, the original thread will still invoke the after-completion diff --git a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/performance/AbstractEntityManagerTest.java b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/performance/AbstractEntityManagerTest.java index a9671604d7..79e818f4e2 100644 --- a/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/performance/AbstractEntityManagerTest.java +++ b/hibernate-envers/src/test/java/org/hibernate/orm/test/envers/performance/AbstractEntityManagerTest.java @@ -24,10 +24,10 @@ import org.hibernate.jpa.AvailableSettings; import org.hibernate.jpa.HibernateEntityManagerFactory; import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl; import org.hibernate.jpa.boot.spi.Bootstrap; -import org.hibernate.jpa.test.PersistenceUnitDescriptorAdapter; import org.hibernate.testing.AfterClassOnce; import org.hibernate.testing.BeforeClassOnce; +import org.hibernate.testing.orm.jpa.PersistenceUnitDescriptorAdapter; import org.hibernate.testing.orm.junit.DialectContext; import org.junit.Before; diff --git a/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaDirectoryTransformation.java b/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaDirectoryTransformation.java index ceadde41d1..2778e89e93 100644 --- a/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaDirectoryTransformation.java +++ b/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaDirectoryTransformation.java @@ -15,6 +15,8 @@ import org.gradle.api.model.ObjectFactory; import org.gradle.api.tasks.CacheableTask; import org.gradle.api.tasks.InputDirectory; import org.gradle.api.tasks.OutputDirectory; +import org.gradle.api.tasks.PathSensitive; +import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.TaskAction; import static org.hibernate.orm.jakarta.JakartaPlugin.JAKARTA; @@ -36,6 +38,7 @@ public abstract class JakartaDirectoryTransformation extends DefaultTask { } @InputDirectory + @PathSensitive( PathSensitivity.RELATIVE ) public DirectoryProperty getSourceDirectory() { return sourceDirectory; } diff --git a/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaJarTransformation.java b/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaJarTransformation.java index 6f45a7197e..529b883773 100644 --- a/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaJarTransformation.java +++ b/hibernate-orm-build/src/main/java/org/hibernate/orm/jakarta/JakartaJarTransformation.java @@ -14,6 +14,8 @@ import org.gradle.api.model.ObjectFactory; import org.gradle.api.tasks.CacheableTask; import org.gradle.api.tasks.InputFile; import org.gradle.api.tasks.OutputFile; +import org.gradle.api.tasks.PathSensitive; +import org.gradle.api.tasks.PathSensitivity; import org.gradle.api.tasks.TaskAction; import static org.hibernate.orm.jakarta.JakartaPlugin.JAKARTA; @@ -35,6 +37,7 @@ public abstract class JakartaJarTransformation extends DefaultTask { } @InputFile + @PathSensitive( PathSensitivity.RELATIVE ) public RegularFileProperty getSourceJar() { return sourceJar; } diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/PersistenceUnitDescriptorAdapter.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitDescriptorAdapter.java similarity index 94% rename from hibernate-core/src/test/java/org/hibernate/jpa/test/PersistenceUnitDescriptorAdapter.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitDescriptorAdapter.java index aeba1b6e49..347087ac66 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/PersistenceUnitDescriptorAdapter.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitDescriptorAdapter.java @@ -1,10 +1,10 @@ /* * 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 . + * 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.jpa.test; +package org.hibernate.testing.orm.jpa; import java.net.URL; import java.util.Collections; diff --git a/hibernate-core/src/test/java/org/hibernate/jpa/test/PersistenceUnitInfoAdapter.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitInfoAdapter.java similarity index 88% rename from hibernate-core/src/test/java/org/hibernate/jpa/test/PersistenceUnitInfoAdapter.java rename to hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitInfoAdapter.java index 37ddd9d4ba..d9c4be3ed9 100644 --- a/hibernate-core/src/test/java/org/hibernate/jpa/test/PersistenceUnitInfoAdapter.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitInfoAdapter.java @@ -1,10 +1,10 @@ /* * 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 . + * 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.jpa.test; +package org.hibernate.testing.orm.jpa; import java.net.URL; import java.util.Collections; @@ -22,6 +22,10 @@ import org.hibernate.jpa.HibernatePersistenceProvider; /** * Implementation of {@link PersistenceUnitInfo} for testing use. * + * Expected usage is to override methods relevant to their specific tests. + * + * See {@link PersistenceUnitInfoImpl} for a more bean-like implementation + * * @author Steve Ebersole */ public class PersistenceUnitInfoAdapter implements PersistenceUnitInfo { diff --git a/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitInfoImpl.java b/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitInfoImpl.java index f183e59740..9e5a7d9b4a 100644 --- a/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitInfoImpl.java +++ b/hibernate-testing/src/main/java/org/hibernate/testing/orm/jpa/PersistenceUnitInfoImpl.java @@ -21,6 +21,12 @@ import javax.sql.DataSource; import org.hibernate.jpa.HibernatePersistenceProvider; /** + * Implementation of {@link PersistenceUnitInfo} for testing use. + * + * This implementation provides a bean-like contract for providing PU information. + * + * See {@link PersistenceUnitInfoAdapter} for an override-based solution + * * @author Steve Ebersole */ public class PersistenceUnitInfoImpl implements PersistenceUnitInfo {