diff --git a/hibernate-core/hibernate-core.gradle b/hibernate-core/hibernate-core.gradle index 73d6f9784c..89b03a64bf 100644 --- a/hibernate-core/hibernate-core.gradle +++ b/hibernate-core/hibernate-core.gradle @@ -44,9 +44,8 @@ dependencies { compileOnly libraries.jakarta_validation compileOnly libraries.jakarta_cdi - compileOnly libraries.ant - testImplementation project(':hibernate-testing') + testImplementation project(':hibernate-ant') testImplementation libraries.shrinkwrap_api testImplementation libraries.shrinkwrap testImplementation libraries.shrinkwrap_descriptors_api_javaee diff --git a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java index 8d3eccb630..f1635b94af 100644 --- a/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java +++ b/hibernate-core/src/main/java/org/hibernate/cfg/AvailableSettings.java @@ -27,6 +27,7 @@ import org.hibernate.resource.transaction.spi.TransactionCoordinator; import org.hibernate.resource.transaction.spi.TransactionCoordinatorBuilder; import org.hibernate.tool.schema.JdbcMetadaAccessStrategy; import org.hibernate.tool.schema.SourceType; +import org.hibernate.tool.schema.UniqueConstraintSchemaUpdateStrategy; /** * @author Steve Ebersole @@ -2026,13 +2027,13 @@ public interface AvailableSettings { * non-explicitly-named unique constraints use randomly generated characters. * * Therefore, select from these strategies. - * {@link org.hibernate.tool.hbm2ddl.UniqueConstraintSchemaUpdateStrategy#DROP_RECREATE_QUIETLY} (DEFAULT): + * {@link UniqueConstraintSchemaUpdateStrategy#DROP_RECREATE_QUIETLY} (DEFAULT): * Attempt to drop, then (re-)create each unique constraint. * Ignore any exceptions thrown. - * {@link org.hibernate.tool.hbm2ddl.UniqueConstraintSchemaUpdateStrategy#RECREATE_QUIETLY}: + * {@link UniqueConstraintSchemaUpdateStrategy#RECREATE_QUIETLY}: * attempt to (re-)create unique constraints, * ignoring exceptions thrown if the constraint already existed - * {@link org.hibernate.tool.hbm2ddl.UniqueConstraintSchemaUpdateStrategy#SKIP}: + * {@link UniqueConstraintSchemaUpdateStrategy#SKIP}: * do not attempt to create unique constraints on a schema update */ String UNIQUE_CONSTRAINT_SCHEMA_UPDATE_STRATEGY = "hibernate.schema_update.unique_constraint_strategy"; diff --git a/hibernate-core/src/main/java/org/hibernate/mapping/Table.java b/hibernate-core/src/main/java/org/hibernate/mapping/Table.java index 10a387ee73..6c18c911bb 100644 --- a/hibernate-core/src/main/java/org/hibernate/mapping/Table.java +++ b/hibernate-core/src/main/java/org/hibernate/mapping/Table.java @@ -13,7 +13,6 @@ import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; -import java.util.Locale; import java.util.Map; import java.util.Objects; @@ -22,7 +21,6 @@ import org.hibernate.MappingException; import org.hibernate.boot.Metadata; import org.hibernate.boot.model.naming.Identifier; import org.hibernate.boot.model.relational.ContributableDatabaseObject; -import org.hibernate.boot.model.relational.Exportable; import org.hibernate.boot.model.relational.InitCommand; import org.hibernate.boot.model.relational.Namespace; import org.hibernate.boot.model.relational.QualifiedTableName; @@ -30,8 +28,6 @@ import org.hibernate.dialect.Dialect; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; import org.hibernate.engine.jdbc.env.spi.QualifiedObjectNameFormatter; import org.hibernate.engine.spi.Mapping; -import org.hibernate.tool.hbm2ddl.ColumnMetadata; -import org.hibernate.tool.hbm2ddl.TableMetadata; import org.hibernate.tool.schema.extract.spi.ColumnInformation; import org.hibernate.tool.schema.extract.spi.TableInformation; @@ -426,35 +422,6 @@ public class Table implements RelationalModel, Serializable, ContributableDataba && Identifier.areEqual( catalog, table.catalog ); } - public void validateColumns(Dialect dialect, Mapping mapping, TableMetadata tableInfo) { - Iterator iter = getColumnIterator(); - while ( iter.hasNext() ) { - Column col = (Column) iter.next(); - - ColumnMetadata columnInfo = tableInfo.getColumnMetadata( col.getName() ); - - if ( columnInfo == null ) { - throw new HibernateException( "Missing column: " + col.getName() + " in " + Table.qualify( tableInfo.getCatalog(), tableInfo.getSchema(), tableInfo.getName())); - } - else { - final boolean typesMatch = - dialect.equivalentTypes( columnInfo.getTypeCode(), col.getSqlTypeCode( mapping ) ) - || col.getSqlType( dialect, mapping ).toLowerCase(Locale.ROOT) - .startsWith( columnInfo.getTypeName().toLowerCase(Locale.ROOT) ); - if ( !typesMatch ) { - throw new HibernateException( - "Wrong column type in " + - Table.qualify( tableInfo.getCatalog(), tableInfo.getSchema(), tableInfo.getName()) + - " for column " + col.getName() + - ". Found: " + columnInfo.getTypeName().toLowerCase(Locale.ROOT) + - ", expected: " + col.getSqlType( dialect, mapping ) - ); - } - } - } - - } - public Iterator sqlAlterStrings( Dialect dialect, Metadata metadata, diff --git a/hibernate-core/src/main/java/org/hibernate/service/StandardServiceInitiators.java b/hibernate-core/src/main/java/org/hibernate/service/StandardServiceInitiators.java index 3b6df6e008..5f2df093d5 100644 --- a/hibernate-core/src/main/java/org/hibernate/service/StandardServiceInitiators.java +++ b/hibernate-core/src/main/java/org/hibernate/service/StandardServiceInitiators.java @@ -36,7 +36,6 @@ import org.hibernate.property.access.internal.PropertyAccessStrategyResolverInit import org.hibernate.resource.beans.spi.ManagedBeanRegistryInitiator; import org.hibernate.resource.transaction.internal.TransactionCoordinatorBuilderInitiator; import org.hibernate.service.internal.SessionFactoryServiceRegistryFactoryInitiator; -import org.hibernate.tool.hbm2ddl.ImportSqlCommandExtractorInitiator; import org.hibernate.tool.schema.internal.SchemaManagementToolInitiator; import org.hibernate.tool.schema.internal.script.SqlScriptExtractorInitiator; diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SqlStatementParserListenerImpl.java b/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SqlStatementParserListenerImpl.java deleted file mode 100644 index cc5cb13ce8..0000000000 --- a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SqlStatementParserListenerImpl.java +++ /dev/null @@ -1,29 +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.tool.hbm2ddl; - -import java.util.ArrayList; -import java.util.List; - -import org.hibernate.grammars.importsql.SqlScriptParser; -import org.hibernate.grammars.importsql.SqlScriptParserBaseListener; - -/** - * @author Andrea Boriero - */ -public class SqlStatementParserListenerImpl extends SqlScriptParserBaseListener { - private final List statements = new ArrayList<>(); - - @Override - public void exitCommand(SqlScriptParser.CommandContext ctx) { - statements.add( ctx.getText() ); - } - - public List getStatements(){ - return statements; - } -} diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/UniqueConstraintSchemaUpdateStrategy.java b/hibernate-core/src/main/java/org/hibernate/tool/schema/UniqueConstraintSchemaUpdateStrategy.java similarity index 93% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/UniqueConstraintSchemaUpdateStrategy.java rename to hibernate-core/src/main/java/org/hibernate/tool/schema/UniqueConstraintSchemaUpdateStrategy.java index 8e9cbe4f69..07c1773efa 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/UniqueConstraintSchemaUpdateStrategy.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/schema/UniqueConstraintSchemaUpdateStrategy.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.tool.hbm2ddl; +package org.hibernate.tool.schema; import java.util.Locale; import org.jboss.logging.Logger; diff --git a/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/AbstractSchemaMigrator.java b/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/AbstractSchemaMigrator.java index 978b4eded1..9c7c1a12ed 100644 --- a/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/AbstractSchemaMigrator.java +++ b/hibernate-core/src/main/java/org/hibernate/tool/schema/internal/AbstractSchemaMigrator.java @@ -36,7 +36,7 @@ import org.hibernate.mapping.Index; import org.hibernate.mapping.Table; import org.hibernate.mapping.UniqueKey; import org.hibernate.resource.transaction.spi.DdlTransactionIsolator; -import org.hibernate.tool.hbm2ddl.UniqueConstraintSchemaUpdateStrategy; +import org.hibernate.tool.schema.UniqueConstraintSchemaUpdateStrategy; import org.hibernate.tool.schema.extract.spi.DatabaseInformation; import org.hibernate.tool.schema.extract.spi.ForeignKeyInformation; import org.hibernate.tool.schema.extract.spi.ForeignKeyInformation.ColumnReferenceMapping; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationMariaDBTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationMariaDBTest.java index 516cdd6f10..e255345766 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationMariaDBTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationMariaDBTest.java @@ -9,9 +9,6 @@ package org.hibernate.orm.test.dialect.functional; import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement; -import java.util.EnumSet; -import java.util.HashMap; -import java.util.List; import java.util.Map; import jakarta.persistence.Column; import jakarta.persistence.Entity; @@ -21,24 +18,14 @@ import jakarta.persistence.Id; import jakarta.persistence.SequenceGenerator; import jakarta.persistence.Table; -import org.hibernate.Session; -import org.hibernate.boot.MetadataSources; -import org.hibernate.boot.registry.StandardServiceRegistryBuilder; -import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.cfg.AvailableSettings; import org.hibernate.cfg.Environment; import org.hibernate.dialect.MariaDB103Dialect; import org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl; -import org.hibernate.engine.spi.SessionFactoryImplementor; import org.hibernate.jpa.test.BaseEntityManagerFunctionalTestCase; -import org.hibernate.service.ServiceRegistry; import org.hibernate.tool.hbm2ddl.SchemaExport; -import org.hibernate.tool.schema.TargetType; -import org.hibernate.tool.schema.extract.spi.SequenceInformation; -import org.hibernate.testing.DialectChecks; import org.hibernate.testing.RequiresDialect; -import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.TestForIssue; import org.junit.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationTest.java index 706a2ba02b..f236d8df34 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/dialect/functional/SequenceInformationTest.java @@ -27,7 +27,6 @@ import org.hibernate.tool.schema.TargetType; import org.hibernate.tool.schema.extract.spi.SequenceInformation; import org.hibernate.testing.DialectChecks; -import org.hibernate.testing.RequiresDialect; import org.hibernate.testing.RequiresDialectFeature; import org.hibernate.testing.TestForIssue; import org.junit.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateSQLServerTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateSQLServerTest.java index 8bb7fccd4a..722de68c89 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateSQLServerTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateSQLServerTest.java @@ -41,7 +41,6 @@ import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.cfg.AvailableSettings; -import org.hibernate.dialect.Dialect; import org.hibernate.dialect.SQLServerDialect; import org.hibernate.engine.jdbc.spi.JdbcServices; import org.hibernate.tool.hbm2ddl.SchemaExport; @@ -59,8 +58,6 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; -import org.jboss.logging.Logger; - import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTableBackedSequenceTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTableBackedSequenceTest.java index ec26d3faaa..9b864a3e98 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTableBackedSequenceTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTableBackedSequenceTest.java @@ -36,7 +36,6 @@ import org.hibernate.tool.schema.spi.TargetDescriptor; import org.hibernate.testing.junit4.BaseUnitTestCase; import org.junit.After; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTest.java index ea358534b5..0e445eb777 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/SchemaUpdateTest.java @@ -38,7 +38,6 @@ import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.spi.MetadataImplementor; import org.hibernate.cfg.AvailableSettings; -import org.hibernate.dialect.Dialect; import org.hibernate.dialect.SQLServerDialect; import org.hibernate.dialect.SybaseDialect; import org.hibernate.engine.jdbc.env.spi.IdentifierHelper; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/idgenerator/SequenceGeneratorsTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/idgenerator/SequenceGeneratorsTest.java index 3531b1dd05..83e905f2c9 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/idgenerator/SequenceGeneratorsTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/idgenerator/SequenceGeneratorsTest.java @@ -30,7 +30,6 @@ import org.hibernate.tool.hbm2ddl.SchemaExport; import org.hibernate.tool.schema.TargetType; import org.hibernate.testing.RequiresDialect; -import org.hibernate.testing.junit4.BaseNonConfigCoreFunctionalTestCase; import org.hibernate.testing.junit4.BaseUnitTestCase; import org.junit.After; import org.junit.Before; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/inheritance/tableperclass/SchemaCreationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/inheritance/tableperclass/SchemaCreationTest.java index 8c78dcbc36..a9ca1f61ba 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/inheritance/tableperclass/SchemaCreationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemaupdate/inheritance/tableperclass/SchemaCreationTest.java @@ -17,11 +17,7 @@ import org.hibernate.boot.MetadataSources; import org.hibernate.boot.registry.StandardServiceRegistry; import org.hibernate.boot.registry.StandardServiceRegistryBuilder; import org.hibernate.boot.spi.MetadataImplementor; -import org.hibernate.dialect.CockroachDialect; -import org.hibernate.dialect.DB2Dialect; import org.hibernate.dialect.Dialect; -import org.hibernate.dialect.PostgreSQL81Dialect; -import org.hibernate.dialect.PostgreSQLDialect; import org.hibernate.engine.jdbc.env.spi.JdbcEnvironment; import org.hibernate.tool.hbm2ddl.SchemaExport; import org.hibernate.tool.schema.TargetType; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/NumericValidationTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/NumericValidationTest.java index ee5e57722e..2c74bbf129 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/NumericValidationTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/schemavalidation/NumericValidationTest.java @@ -37,7 +37,6 @@ import org.hibernate.tool.schema.spi.SourceDescriptor; import org.hibernate.tool.schema.spi.TargetDescriptor; import org.hibernate.testing.TestForIssue; -import org.hibernate.orm.test.legacy.S; import org.junit.After; import org.junit.Before; import org.junit.Test; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportExtractorTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportExtractorTest.java index 815ab45cf0..27cc90ba34 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportExtractorTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportExtractorTest.java @@ -12,7 +12,6 @@ import java.io.InputStreamReader; import java.io.StringReader; import java.util.List; -import org.hibernate.dialect.Dialect; import org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor; import org.hibernate.testing.orm.junit.DialectContext; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportFileTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportFileTest.java index 9777ac7e90..0633272599 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportFileTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportFileTest.java @@ -6,16 +6,9 @@ */ package org.hibernate.orm.test.tool.schema.scripts; -import java.sql.Connection; -import java.sql.PreparedStatement; -import java.sql.SQLException; - -import org.hibernate.Session; -import org.hibernate.Transaction; import org.hibernate.cfg.Configuration; import org.hibernate.cfg.Environment; import org.hibernate.dialect.H2Dialect; -import org.hibernate.jdbc.Work; import org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor; import org.hibernate.testing.AfterClassOnce; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithSpacesAfterTheLastStatementTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithSpacesAfterTheLastStatementTest.java index 7352ea921a..2e5b9316bf 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithSpacesAfterTheLastStatementTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithSpacesAfterTheLastStatementTest.java @@ -10,7 +10,6 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.util.List; -import org.hibernate.dialect.Dialect; import org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor; import org.hibernate.testing.TestForIssue; diff --git a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithTabsAndSpacesTest.java b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithTabsAndSpacesTest.java index d28b1a7fff..6af6f8e60a 100644 --- a/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithTabsAndSpacesTest.java +++ b/hibernate-core/src/test/java/org/hibernate/orm/test/tool/schema/scripts/MultiLineImportWithTabsAndSpacesTest.java @@ -10,7 +10,6 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.util.List; -import org.hibernate.dialect.Dialect; import org.hibernate.tool.hbm2ddl.MultipleLinesSqlCommandExtractor; import org.hibernate.testing.TestForIssue; diff --git a/hibernate-spatial/src/test/java/org/hibernate/spatial/integration/TestSpatialSchemaGeneration.java b/hibernate-spatial/src/test/java/org/hibernate/spatial/integration/TestSpatialSchemaGeneration.java index f244e7acec..af60d9be4e 100644 --- a/hibernate-spatial/src/test/java/org/hibernate/spatial/integration/TestSpatialSchemaGeneration.java +++ b/hibernate-spatial/src/test/java/org/hibernate/spatial/integration/TestSpatialSchemaGeneration.java @@ -11,7 +11,6 @@ import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.nio.file.Files; -import java.util.ArrayList; import java.util.Arrays; import java.util.EnumSet; import java.util.List; diff --git a/settings.gradle b/settings.gradle index 5ef1fd2ff6..7f84f0f68d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -158,6 +158,9 @@ project(':hibernate-gradle-plugin').projectDir = new File(rootProject.projectDir include 'hibernate-enhance-maven-plugin' project(':hibernate-enhance-maven-plugin').projectDir = new File(rootProject.projectDir, "tooling/hibernate-enhance-maven-plugin") +include 'hibernate-ant' +project(':hibernate-ant').projectDir = new File(rootProject.projectDir, "tooling/hibernate-ant") + include 'hibernate-community-dialects' rootProject.children.each { project -> @@ -166,3 +169,4 @@ rootProject.children.each { project -> assert project.buildFile.exists() assert project.buildFile.isFile() } + diff --git a/tooling/hibernate-ant/hibernate-ant.gradle b/tooling/hibernate-ant/hibernate-ant.gradle new file mode 100644 index 0000000000..5f3df2b09a --- /dev/null +++ b/tooling/hibernate-ant/hibernate-ant.gradle @@ -0,0 +1,10 @@ + +description = 'Annotation Processor to generate JPA 2 static metamodel classes' + +apply from: rootProject.file( 'gradle/published-java-module.gradle' ) +apply plugin: 'version-injection' + +dependencies { + compileOnly libraries.ant + implementation project( ':hibernate-core' ) +} \ No newline at end of file diff --git a/hibernate-core/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/enhance/EnhancementTask.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ColumnMetadata.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ColumnMetadata.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ColumnMetadata.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ColumnMetadata.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ConnectionHelper.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ConnectionHelper.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ConnectionHelper.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ConnectionHelper.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseExporter.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseExporter.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseExporter.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/DatabaseExporter.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/Exporter.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/Exporter.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/Exporter.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/Exporter.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/FileExporter.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/FileExporter.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/FileExporter.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/FileExporter.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ForeignKeyMetadata.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ForeignKeyMetadata.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ForeignKeyMetadata.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ForeignKeyMetadata.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ImportScriptException.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ImportScriptException.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ImportScriptException.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ImportScriptException.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractor.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractor.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractor.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractor.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractorInitiator.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractorInitiator.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractorInitiator.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ImportSqlCommandExtractorInitiator.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/IndexMetadata.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/IndexMetadata.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/IndexMetadata.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/IndexMetadata.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ManagedProviderConnectionHelper.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ManagedProviderConnectionHelper.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ManagedProviderConnectionHelper.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ManagedProviderConnectionHelper.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/MultipleLinesSqlCommandExtractor.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/MultipleLinesSqlCommandExtractor.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/MultipleLinesSqlCommandExtractor.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/MultipleLinesSqlCommandExtractor.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExport.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExportTask.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExportTask.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExportTask.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaExportTask.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdate.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateCommand.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateCommand.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateCommand.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateCommand.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateTask.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateTask.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateTask.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaUpdateTask.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidator.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidatorTask.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidatorTask.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidatorTask.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SchemaValidatorTask.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ScriptExporter.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ScriptExporter.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/ScriptExporter.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/ScriptExporter.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SingleLineSqlCommandExtractor.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SingleLineSqlCommandExtractor.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SingleLineSqlCommandExtractor.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SingleLineSqlCommandExtractor.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionHelper.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionHelper.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionHelper.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionHelper.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionProviderConnectionHelper.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionProviderConnectionHelper.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionProviderConnectionHelper.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/SuppliedConnectionProviderConnectionHelper.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TableMetadata.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/Target.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/Target.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/Target.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/Target.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/TargetTypeHelper.java b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TargetTypeHelper.java similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/TargetTypeHelper.java rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/TargetTypeHelper.java diff --git a/hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/package.html b/tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/package.html similarity index 100% rename from hibernate-core/src/main/java/org/hibernate/tool/hbm2ddl/package.html rename to tooling/hibernate-ant/src/main/java/org/hibernate/tool/hbm2ddl/package.html