From 16792db28cdde3c9f803ac7fb9f79048e4920e56 Mon Sep 17 00:00:00 2001 From: Koen Aers Date: Tue, 23 Sep 2025 09:56:36 +0200 Subject: [PATCH] HBX-3128: Avoid use of Maven invoker plugin while performing functional testing - Remove the duplicate integration tests that were called using Maven invoker Signed-off-by: Koen Aers --- maven/pom.xml | 13 ----- maven/src/it/hbm2java/invoker.properties | 18 ------ maven/src/it/hbm2java/jpa-default/pom.xml | 53 ------------------ maven/src/it/hbm2java/jpa-default/setup.bsh | 26 --------- .../src/main/resources/hibernate.properties | 21 ------- maven/src/it/hbm2java/jpa-default/verify.bsh | 29 ---------- maven/src/it/hbm2java/no-annotations/pom.xml | 56 ------------------- .../src/it/hbm2java/no-annotations/setup.bsh | 26 --------- .../src/main/resources/hibernate.properties | 21 ------- .../src/it/hbm2java/no-annotations/verify.bsh | 29 ---------- maven/src/it/hbm2java/no-generics/pom.xml | 56 ------------------- maven/src/it/hbm2java/no-generics/setup.bsh | 34 ----------- .../src/main/resources/hibernate.properties | 21 ------- maven/src/it/hbm2java/no-generics/verify.bsh | 29 ---------- .../src/it/hbm2java/output-directory/pom.xml | 56 ------------------- .../it/hbm2java/output-directory/setup.bsh | 26 --------- .../src/main/resources/hibernate.properties | 21 ------- .../it/hbm2java/output-directory/verify.bsh | 29 ---------- maven/src/it/hbm2java/template-path/pom.xml | 56 ------------------- maven/src/it/hbm2java/template-path/setup.bsh | 26 --------- .../src/main/resources/hibernate.properties | 21 ------- .../template-path/templates/pojo/Pojo.ftl | 18 ------ .../src/it/hbm2java/template-path/verify.bsh | 29 ---------- maven/src/it/hbm2java/use-generics/pom.xml | 53 ------------------ maven/src/it/hbm2java/use-generics/setup.bsh | 34 ----------- .../src/main/resources/hibernate.properties | 21 ------- maven/src/it/hbm2java/use-generics/verify.bsh | 29 ---------- 27 files changed, 851 deletions(-) delete mode 100644 maven/src/it/hbm2java/invoker.properties delete mode 100644 maven/src/it/hbm2java/jpa-default/pom.xml delete mode 100644 maven/src/it/hbm2java/jpa-default/setup.bsh delete mode 100644 maven/src/it/hbm2java/jpa-default/src/main/resources/hibernate.properties delete mode 100644 maven/src/it/hbm2java/jpa-default/verify.bsh delete mode 100644 maven/src/it/hbm2java/no-annotations/pom.xml delete mode 100644 maven/src/it/hbm2java/no-annotations/setup.bsh delete mode 100644 maven/src/it/hbm2java/no-annotations/src/main/resources/hibernate.properties delete mode 100644 maven/src/it/hbm2java/no-annotations/verify.bsh delete mode 100644 maven/src/it/hbm2java/no-generics/pom.xml delete mode 100644 maven/src/it/hbm2java/no-generics/setup.bsh delete mode 100644 maven/src/it/hbm2java/no-generics/src/main/resources/hibernate.properties delete mode 100644 maven/src/it/hbm2java/no-generics/verify.bsh delete mode 100644 maven/src/it/hbm2java/output-directory/pom.xml delete mode 100644 maven/src/it/hbm2java/output-directory/setup.bsh delete mode 100644 maven/src/it/hbm2java/output-directory/src/main/resources/hibernate.properties delete mode 100644 maven/src/it/hbm2java/output-directory/verify.bsh delete mode 100644 maven/src/it/hbm2java/template-path/pom.xml delete mode 100644 maven/src/it/hbm2java/template-path/setup.bsh delete mode 100644 maven/src/it/hbm2java/template-path/src/main/resources/hibernate.properties delete mode 100644 maven/src/it/hbm2java/template-path/templates/pojo/Pojo.ftl delete mode 100644 maven/src/it/hbm2java/template-path/verify.bsh delete mode 100644 maven/src/it/hbm2java/use-generics/pom.xml delete mode 100644 maven/src/it/hbm2java/use-generics/setup.bsh delete mode 100644 maven/src/it/hbm2java/use-generics/src/main/resources/hibernate.properties delete mode 100644 maven/src/it/hbm2java/use-generics/verify.bsh diff --git a/maven/pom.xml b/maven/pom.xml index 1a5b996c06..176c5cea05 100644 --- a/maven/pom.xml +++ b/maven/pom.xml @@ -160,27 +160,14 @@ maven-invoker-plugin ${maven-invoker-plugin.version} - - - com.h2database - h2 - ${h2.version} - - - true - ${project.build.directory}/it ${project.build.directory}/local-repo - setup - verify - **/pom.xml integration-test install - run diff --git a/maven/src/it/hbm2java/invoker.properties b/maven/src/it/hbm2java/invoker.properties deleted file mode 100644 index 27e586ee24..0000000000 --- a/maven/src/it/hbm2java/invoker.properties +++ /dev/null @@ -1,18 +0,0 @@ -############################################################################ -# Hibernate Tools, Tooling for your Hibernate Projects # -# # -# Copyright 2018-2025 Red Hat, Inc. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" basis, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################ -invoker.goals = generate-resources \ No newline at end of file diff --git a/maven/src/it/hbm2java/jpa-default/pom.xml b/maven/src/it/hbm2java/jpa-default/pom.xml deleted file mode 100644 index 940e1a8d6c..0000000000 --- a/maven/src/it/hbm2java/jpa-default/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.hibernate.tool.maven.test - hbm2java-jpa-default - 0.0.1-SNAPSHOT - - - - com.h2database - h2 - @h2.version@ - - - - - - - org.hibernate.tool - hibernate-tools-maven - @project.version@ - - - Entity generation - generate-sources - - hbm2java - - - - - - - - \ No newline at end of file diff --git a/maven/src/it/hbm2java/jpa-default/setup.bsh b/maven/src/it/hbm2java/jpa-default/setup.bsh deleted file mode 100644 index 70f35cb226..0000000000 --- a/maven/src/it/hbm2java/jpa-default/setup.bsh +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.sql.DriverManager; -import java.sql.Connection; - -String JDBC_CONNECTION = "jdbc:h2:" + basedir + "/test"; -String CREATE_PERSON_TABLE = "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))"; - -Connection connection = DriverManager.getConnection(JDBC_CONNECTION); -connection.createStatement().execute(CREATE_PERSON_TABLE); -connection.close(); diff --git a/maven/src/it/hbm2java/jpa-default/src/main/resources/hibernate.properties b/maven/src/it/hbm2java/jpa-default/src/main/resources/hibernate.properties deleted file mode 100644 index 32da3e5d10..0000000000 --- a/maven/src/it/hbm2java/jpa-default/src/main/resources/hibernate.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# Hibernate Tools, Tooling for your Hibernate Projects # -# # -# Copyright 2018-2025 Red Hat, Inc. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" basis, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################ -hibernate.connection.driver_class=org.h2.Driver -hibernate.connection.url=jdbc:h2:./test -hibernate.default_catalog=TEST -hibernate.default_schema=PUBLIC \ No newline at end of file diff --git a/maven/src/it/hbm2java/jpa-default/verify.bsh b/maven/src/it/hbm2java/jpa-default/verify.bsh deleted file mode 100644 index 31928d4d9b..0000000000 --- a/maven/src/it/hbm2java/jpa-default/verify.bsh +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.nio.file.Files; - -File personEntity = new File(basedir, "target/generated-sources/Person.java"); -if (!personEntity.isFile()) { - throw new FileNotFoundException("Could not find generated JPA Entity: " + personEntity); -} -byte[] raw = Files.readAllBytes(personEntity.toPath()); -if (!new String(raw).contains("import jakarta.persistence.Entity;")) { - throw new RuntimeException("The generated java file is not a JPA Entity"); -} - - diff --git a/maven/src/it/hbm2java/no-annotations/pom.xml b/maven/src/it/hbm2java/no-annotations/pom.xml deleted file mode 100644 index f1d6f32fa4..0000000000 --- a/maven/src/it/hbm2java/no-annotations/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - 4.0.0 - - org.hibernate.tool.maven.test - hbm2java-no-annotations - 0.0.1-SNAPSHOT - - - - com.h2database - h2 - @h2.version@ - - - - - - - org.hibernate.tool - hibernate-tools-maven - @project.version@ - - - Entity generation - generate-sources - - hbm2java - - - - - false - - - - - - \ No newline at end of file diff --git a/maven/src/it/hbm2java/no-annotations/setup.bsh b/maven/src/it/hbm2java/no-annotations/setup.bsh deleted file mode 100644 index 70f35cb226..0000000000 --- a/maven/src/it/hbm2java/no-annotations/setup.bsh +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.sql.DriverManager; -import java.sql.Connection; - -String JDBC_CONNECTION = "jdbc:h2:" + basedir + "/test"; -String CREATE_PERSON_TABLE = "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))"; - -Connection connection = DriverManager.getConnection(JDBC_CONNECTION); -connection.createStatement().execute(CREATE_PERSON_TABLE); -connection.close(); diff --git a/maven/src/it/hbm2java/no-annotations/src/main/resources/hibernate.properties b/maven/src/it/hbm2java/no-annotations/src/main/resources/hibernate.properties deleted file mode 100644 index 32da3e5d10..0000000000 --- a/maven/src/it/hbm2java/no-annotations/src/main/resources/hibernate.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# Hibernate Tools, Tooling for your Hibernate Projects # -# # -# Copyright 2018-2025 Red Hat, Inc. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" basis, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################ -hibernate.connection.driver_class=org.h2.Driver -hibernate.connection.url=jdbc:h2:./test -hibernate.default_catalog=TEST -hibernate.default_schema=PUBLIC \ No newline at end of file diff --git a/maven/src/it/hbm2java/no-annotations/verify.bsh b/maven/src/it/hbm2java/no-annotations/verify.bsh deleted file mode 100644 index c53e2a18b5..0000000000 --- a/maven/src/it/hbm2java/no-annotations/verify.bsh +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.nio.file.Files; - -File personEntity = new File(basedir, "target/generated-sources/Person.java"); -if (!personEntity.isFile()) { - throw new FileNotFoundException("Could not find generated Java file: " + personEntity); -} -byte[] raw = Files.readAllBytes(personEntity.toPath()); -if (new String(raw).contains("import jakarta.persistence.Entity;")) { - throw new RuntimeException("The generated Java file should not have an @Entity annotation"); -} - - diff --git a/maven/src/it/hbm2java/no-generics/pom.xml b/maven/src/it/hbm2java/no-generics/pom.xml deleted file mode 100644 index 082b942d96..0000000000 --- a/maven/src/it/hbm2java/no-generics/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - 4.0.0 - - org.hibernate.tool.maven.test - hbm2java-no-generics - 0.0.1-SNAPSHOT - - - - com.h2database - h2 - @h2.version@ - - - - - - - org.hibernate.tool - hibernate-tools-maven - @project.version@ - - - Entity generation - generate-sources - - hbm2java - - - - - false - - - - - - \ No newline at end of file diff --git a/maven/src/it/hbm2java/no-generics/setup.bsh b/maven/src/it/hbm2java/no-generics/setup.bsh deleted file mode 100644 index b4b5a472c6..0000000000 --- a/maven/src/it/hbm2java/no-generics/setup.bsh +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.sql.DriverManager; -import java.sql.Connection; -import java.sql.Statement; - -String JDBC_CONNECTION = "jdbc:h2:" + basedir + "/test"; -String CREATE_PERSON_TABLE = - "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))"; -String CREATE_ITEM_TABLE = - "create table ITEM (ID int not null, NAME varchar(20), OWNER_ID int not null, " + - " primary key (ID), foreign key (OWNER_ID) references PERSON(ID))"; - -Connection connection = DriverManager.getConnection(JDBC_CONNECTION); -Statement statement = connection.createStatement(); -statement.execute(CREATE_PERSON_TABLE); -statement.execute(CREATE_ITEM_TABLE); -statement.close(); -connection.close(); diff --git a/maven/src/it/hbm2java/no-generics/src/main/resources/hibernate.properties b/maven/src/it/hbm2java/no-generics/src/main/resources/hibernate.properties deleted file mode 100644 index 32da3e5d10..0000000000 --- a/maven/src/it/hbm2java/no-generics/src/main/resources/hibernate.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# Hibernate Tools, Tooling for your Hibernate Projects # -# # -# Copyright 2018-2025 Red Hat, Inc. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" basis, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################ -hibernate.connection.driver_class=org.h2.Driver -hibernate.connection.url=jdbc:h2:./test -hibernate.default_catalog=TEST -hibernate.default_schema=PUBLIC \ No newline at end of file diff --git a/maven/src/it/hbm2java/no-generics/verify.bsh b/maven/src/it/hbm2java/no-generics/verify.bsh deleted file mode 100644 index 74d90e2a4b..0000000000 --- a/maven/src/it/hbm2java/no-generics/verify.bsh +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.nio.file.Files; - -File personEntity = new File(basedir, "target/generated-sources/Person.java"); -if (!personEntity.isFile()) { - throw new FileNotFoundException("Could not find generated Java file: " + personEntity); -} -byte[] raw = Files.readAllBytes(personEntity.toPath()); -if (new String(raw).contains("Set")) { - throw new RuntimeException("The generated Java file should not have generics"); -} - - diff --git a/maven/src/it/hbm2java/output-directory/pom.xml b/maven/src/it/hbm2java/output-directory/pom.xml deleted file mode 100644 index 23d1cfd9a2..0000000000 --- a/maven/src/it/hbm2java/output-directory/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - 4.0.0 - - org.hibernate.tool.maven.test - hbm2java-output-directory - 0.0.1-SNAPSHOT - - - - com.h2database - h2 - @h2.version@ - - - - - - - org.hibernate.tool - hibernate-tools-maven - @project.version@ - - - Entity generation - generate-sources - - hbm2java - - - - - ${build.directory}/someRandomFolder - - - - - - \ No newline at end of file diff --git a/maven/src/it/hbm2java/output-directory/setup.bsh b/maven/src/it/hbm2java/output-directory/setup.bsh deleted file mode 100644 index 70f35cb226..0000000000 --- a/maven/src/it/hbm2java/output-directory/setup.bsh +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.sql.DriverManager; -import java.sql.Connection; - -String JDBC_CONNECTION = "jdbc:h2:" + basedir + "/test"; -String CREATE_PERSON_TABLE = "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))"; - -Connection connection = DriverManager.getConnection(JDBC_CONNECTION); -connection.createStatement().execute(CREATE_PERSON_TABLE); -connection.close(); diff --git a/maven/src/it/hbm2java/output-directory/src/main/resources/hibernate.properties b/maven/src/it/hbm2java/output-directory/src/main/resources/hibernate.properties deleted file mode 100644 index 32da3e5d10..0000000000 --- a/maven/src/it/hbm2java/output-directory/src/main/resources/hibernate.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# Hibernate Tools, Tooling for your Hibernate Projects # -# # -# Copyright 2018-2025 Red Hat, Inc. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" basis, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################ -hibernate.connection.driver_class=org.h2.Driver -hibernate.connection.url=jdbc:h2:./test -hibernate.default_catalog=TEST -hibernate.default_schema=PUBLIC \ No newline at end of file diff --git a/maven/src/it/hbm2java/output-directory/verify.bsh b/maven/src/it/hbm2java/output-directory/verify.bsh deleted file mode 100644 index 33fef7e283..0000000000 --- a/maven/src/it/hbm2java/output-directory/verify.bsh +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.nio.file.Files; - -File personEntity = new File(basedir, "target/someRandomFolder/Person.java"); -if (!personEntity.isFile()) { - throw new FileNotFoundException("Could not find generated JPA Entity: " + personEntity); -} -byte[] raw = Files.readAllBytes(personEntity.toPath()); -if (!new String(raw).contains("import jakarta.persistence.Entity;")) { - throw new RuntimeException("The generated java file is not a JPA Entity"); -} - - diff --git a/maven/src/it/hbm2java/template-path/pom.xml b/maven/src/it/hbm2java/template-path/pom.xml deleted file mode 100644 index b79b210233..0000000000 --- a/maven/src/it/hbm2java/template-path/pom.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - 4.0.0 - - org.hibernate.tool.maven.test - hbm2java-template-path - 0.0.1-SNAPSHOT - - - - com.h2database - h2 - @h2.version@ - - - - - - - org.hibernate.tool - hibernate-tools-maven - @project.version@ - - - Entity generation - generate-sources - - hbm2java - - - - - ${basedir}/templates - - - - - - \ No newline at end of file diff --git a/maven/src/it/hbm2java/template-path/setup.bsh b/maven/src/it/hbm2java/template-path/setup.bsh deleted file mode 100644 index 70f35cb226..0000000000 --- a/maven/src/it/hbm2java/template-path/setup.bsh +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.sql.DriverManager; -import java.sql.Connection; - -String JDBC_CONNECTION = "jdbc:h2:" + basedir + "/test"; -String CREATE_PERSON_TABLE = "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))"; - -Connection connection = DriverManager.getConnection(JDBC_CONNECTION); -connection.createStatement().execute(CREATE_PERSON_TABLE); -connection.close(); diff --git a/maven/src/it/hbm2java/template-path/src/main/resources/hibernate.properties b/maven/src/it/hbm2java/template-path/src/main/resources/hibernate.properties deleted file mode 100644 index 32da3e5d10..0000000000 --- a/maven/src/it/hbm2java/template-path/src/main/resources/hibernate.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# Hibernate Tools, Tooling for your Hibernate Projects # -# # -# Copyright 2018-2025 Red Hat, Inc. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" basis, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################ -hibernate.connection.driver_class=org.h2.Driver -hibernate.connection.url=jdbc:h2:./test -hibernate.default_catalog=TEST -hibernate.default_schema=PUBLIC \ No newline at end of file diff --git a/maven/src/it/hbm2java/template-path/templates/pojo/Pojo.ftl b/maven/src/it/hbm2java/template-path/templates/pojo/Pojo.ftl deleted file mode 100644 index 18f3de1a5a..0000000000 --- a/maven/src/it/hbm2java/template-path/templates/pojo/Pojo.ftl +++ /dev/null @@ -1,18 +0,0 @@ - -// This is just an example of a custom template - - diff --git a/maven/src/it/hbm2java/template-path/verify.bsh b/maven/src/it/hbm2java/template-path/verify.bsh deleted file mode 100644 index b0c2af2d87..0000000000 --- a/maven/src/it/hbm2java/template-path/verify.bsh +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.nio.file.Files; - -File personEntity = new File(basedir, "target/generated-sources/Person.java"); -if (!personEntity.isFile()) { - throw new FileNotFoundException("Could not find generated JPA Entity: " + personEntity); -} -byte[] raw = Files.readAllBytes(personEntity.toPath()); -if (!new String(raw).contains("// This is just an example of a custom template")) { - throw new RuntimeException("The correct template has not been used"); -} - - diff --git a/maven/src/it/hbm2java/use-generics/pom.xml b/maven/src/it/hbm2java/use-generics/pom.xml deleted file mode 100644 index 8b2931c1ed..0000000000 --- a/maven/src/it/hbm2java/use-generics/pom.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - 4.0.0 - - org.hibernate.tool.maven.test - hbm2java-use-generics - 0.0.1-SNAPSHOT - - - - com.h2database - h2 - @h2.version@ - - - - - - - org.hibernate.tool - hibernate-tools-maven - @project.version@ - - - Entity generation - generate-sources - - hbm2java - - - - - - - - \ No newline at end of file diff --git a/maven/src/it/hbm2java/use-generics/setup.bsh b/maven/src/it/hbm2java/use-generics/setup.bsh deleted file mode 100644 index b4b5a472c6..0000000000 --- a/maven/src/it/hbm2java/use-generics/setup.bsh +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.sql.DriverManager; -import java.sql.Connection; -import java.sql.Statement; - -String JDBC_CONNECTION = "jdbc:h2:" + basedir + "/test"; -String CREATE_PERSON_TABLE = - "create table PERSON (ID int not null, NAME varchar(20), primary key (ID))"; -String CREATE_ITEM_TABLE = - "create table ITEM (ID int not null, NAME varchar(20), OWNER_ID int not null, " + - " primary key (ID), foreign key (OWNER_ID) references PERSON(ID))"; - -Connection connection = DriverManager.getConnection(JDBC_CONNECTION); -Statement statement = connection.createStatement(); -statement.execute(CREATE_PERSON_TABLE); -statement.execute(CREATE_ITEM_TABLE); -statement.close(); -connection.close(); diff --git a/maven/src/it/hbm2java/use-generics/src/main/resources/hibernate.properties b/maven/src/it/hbm2java/use-generics/src/main/resources/hibernate.properties deleted file mode 100644 index 32da3e5d10..0000000000 --- a/maven/src/it/hbm2java/use-generics/src/main/resources/hibernate.properties +++ /dev/null @@ -1,21 +0,0 @@ -############################################################################ -# Hibernate Tools, Tooling for your Hibernate Projects # -# # -# Copyright 2018-2025 Red Hat, Inc. # -# # -# Licensed under the Apache License, Version 2.0 (the "License"); # -# you may not use this file except in compliance with the License. # -# You may obtain a copy of the License at # -# # -# http://www.apache.org/licenses/LICENSE-2.0 # -# # -# Unless required by applicable law or agreed to in writing, software # -# distributed under the License is distributed on an "AS IS" basis, # -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # -# See the License for the specific language governing permissions and # -# limitations under the License. # -############################################################################ -hibernate.connection.driver_class=org.h2.Driver -hibernate.connection.url=jdbc:h2:./test -hibernate.default_catalog=TEST -hibernate.default_schema=PUBLIC \ No newline at end of file diff --git a/maven/src/it/hbm2java/use-generics/verify.bsh b/maven/src/it/hbm2java/use-generics/verify.bsh deleted file mode 100644 index ddc33e4437..0000000000 --- a/maven/src/it/hbm2java/use-generics/verify.bsh +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Hibernate Tools, Tooling for your Hibernate Projects - * - * Copyright 2018-2025 Red Hat, Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -import java.nio.file.Files; - -File personEntity = new File(basedir, "target/generated-sources/Person.java"); -if (!personEntity.isFile()) { - throw new FileNotFoundException("Could not find generated Java file: " + personEntity); -} -byte[] raw = Files.readAllBytes(personEntity.toPath()); -if (!new String(raw).contains("Set")) { - throw new RuntimeException("The generated Java file should use generics"); -} - -