diff --git a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/dev/HibernateOrmDevConsoleProcessor.java b/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/dev/HibernateOrmDevConsoleProcessor.java deleted file mode 100644 index 722117fdd8f03..0000000000000 --- a/extensions/hibernate-orm/deployment/src/main/java/io/quarkus/hibernate/orm/deployment/dev/HibernateOrmDevConsoleProcessor.java +++ /dev/null @@ -1,22 +0,0 @@ -package io.quarkus.hibernate.orm.deployment.dev; - -import io.quarkus.deployment.IsDevelopment; -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.annotations.BuildSteps; -import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem; -import io.quarkus.devconsole.spi.DevConsoleRuntimeTemplateInfoBuildItem; -import io.quarkus.hibernate.orm.deployment.HibernateOrmEnabled; -import io.quarkus.hibernate.orm.runtime.dev.HibernateOrmDevInfoSupplier; - -@BuildSteps(onlyIf = { HibernateOrmEnabled.class, IsDevelopment.class }) -@Deprecated // Only useful for the legacy Dev UI -public class HibernateOrmDevConsoleProcessor { - - @BuildStep - public DevConsoleRuntimeTemplateInfoBuildItem exposeInfo(CurateOutcomeBuildItem curateOutcomeBuildItem) { - return new DevConsoleRuntimeTemplateInfoBuildItem("persistence", new HibernateOrmDevInfoSupplier(), - this.getClass(), - curateOutcomeBuildItem); - } - -} diff --git a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/embedded.html b/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/embedded.html deleted file mode 100644 index 7df9c3c4311f6..0000000000000 --- a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/embedded.html +++ /dev/null @@ -1,11 +0,0 @@ - - - Persistence units {info:persistence.persistenceUnits.size} - - - - Entities {info:persistence.numberOfEntities} - - - - Named Queries {info:persistence.numberOfNamedQueries} diff --git a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/managed-entities.html b/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/managed-entities.html deleted file mode 100644 index b606c7932f755..0000000000000 --- a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/managed-entities.html +++ /dev/null @@ -1,40 +0,0 @@ -{#include main} -{#style} -{/style} -{#title}Managed Entities{/title} -{#body} - -{#if info:persistence.persistenceUnits.isEmpty} -

No persistence units were found.

-{#else} - -{#for pu in info:persistence.persistenceUnits} -

Persistence Unit {pu.name}

- -{#if pu.managedEntities.isEmpty} -

No entities were found.

-{#else} - - - - - - - - - - {#for entity in pu.managedEntities} - - - - - - {/for} - -
#Class nameTable name
{entity_count}.{entity.className}{entity.tableName}
-{/if} -{/for} - -{/if} -{/body} -{/include} diff --git a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/named-queries.html b/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/named-queries.html deleted file mode 100644 index 14f1425ce3169..0000000000000 --- a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/named-queries.html +++ /dev/null @@ -1,47 +0,0 @@ -{#include main} -{#style} -{/style} -{#title}Named Queries{/title} -{#body} - -{#if info:persistence.persistenceUnits.isEmpty} -

No persistence units were found.

-{#else} - -{#for pu in info:persistence.persistenceUnits} -

Persistence Unit {pu.name}

- -{#if pu.allNamedQueries.isEmpty} -

No named queries were found.

-{#else} - - - - - - - - - - - - - {#for query in pu.allNamedQueries} - - - - - - - - - {/for} - -
#NameQueryLock ModeCacheableQuery Type
{query_count}.{query.name}{query.query}{query.lockMode}{query.cacheable}{query.type}
-{/if} - -{/for} -{/if} - -{/body} -{/include} diff --git a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/persistence-units.html b/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/persistence-units.html deleted file mode 100644 index 1349bb6c6e09d..0000000000000 --- a/extensions/hibernate-orm/deployment/src/main/resources/dev-templates/persistence-units.html +++ /dev/null @@ -1,108 +0,0 @@ -{#include main} -{#style} -.ddl-script { - padding: 5px; -} -.hidden { - display: none; -} -th .badge { - font-size: 100%; -} -a.script-heading { - display: block; - float:left; - width: 90%; - text-decoration: none; -} -{/style} -{#title}Persistence Units{/title} -{#body} - -{#if info:persistence.persistenceUnits.isEmpty} -

No persistence units found.

-{#else} -{#for pu in info:persistence.persistenceUnits} - - - - - - - - - - - - - - - - - - - - - - - - - -
Persistence Unit {pu.name}
- - - Create Script - - - Copy -
- - - Drop Script - - - Copy -
-{/for} -{/if} - - - -{/body} -{/include} diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmActiveFalseAndNamedPuActiveTrueTest.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmActiveFalseAndNamedPuActiveTrueTest.java deleted file mode 100644 index 65fc963124c9d..0000000000000 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmActiveFalseAndNamedPuActiveTrueTest.java +++ /dev/null @@ -1,55 +0,0 @@ -package io.quarkus.test.devconsole; - -import org.hamcrest.Matchers; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.RegisterExtension; - -import io.quarkus.test.QuarkusDevModeTest; -import io.quarkus.test.devconsole.namedpu.MyNamedPuEntity; -import io.restassured.RestAssured; - -/** - * Note that this test cannot be placed under the relevant {@code -deployment} module because then the DEV UI processor would - * not be able to locate the template resources correctly. - */ -public class DevConsoleHibernateOrmActiveFalseAndNamedPuActiveTrueTest { - - @RegisterExtension - static final QuarkusDevModeTest test = new QuarkusDevModeTest() - .withApplicationRoot((jar) -> jar.addAsResource( - new StringAsset("quarkus.datasource.db-kind=h2\n" - + "quarkus.datasource.jdbc.url=jdbc:h2:mem:test\n" - + "quarkus.datasource.\"nameddatasource\".db-kind=h2\n" - + "quarkus.datasource.\"nameddatasource\".jdbc.url=jdbc:h2:mem:test2\n" - // Hibernate ORM is inactive for the default PU - + "quarkus.hibernate-orm.active=false\n" - + "quarkus.hibernate-orm.datasource=\n" - + "quarkus.hibernate-orm.packages=io.quarkus.test.devconsole\n" - // ... but it's (implicitly) active for a named PU - + "quarkus.hibernate-orm.\"namedpu\".datasource=nameddatasource\n" - + "quarkus.hibernate-orm.\"namedpu\".packages=io.quarkus.test.devconsole.namedpu\n"), - "application.properties") - .addClasses(MyEntity.class) - .addClasses(MyNamedPuEntity.class)); - - @Test - public void testLegacyPages() { - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/persistence-units") - .then() - .statusCode(200) - .body(Matchers.not(Matchers.containsString("<default>"))) - .body(Matchers.containsString("Persistence Unit namedpu")); - - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/managed-entities") - .then() - .statusCode(200) - .body(Matchers.not(Matchers.containsString(MyEntity.class.getName()))) - .body(Matchers.containsString(MyNamedPuEntity.class.getName())); - - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/named-queries") - .then() - .statusCode(200) - .body(Matchers.containsString("No named queries were found.")); - } -} diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmActiveFalseTest.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmActiveFalseTest.java deleted file mode 100644 index c7636abd64a5b..0000000000000 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmActiveFalseTest.java +++ /dev/null @@ -1,44 +0,0 @@ -package io.quarkus.test.devconsole; - -import org.hamcrest.Matchers; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.RegisterExtension; - -import io.quarkus.test.QuarkusDevModeTest; -import io.restassured.RestAssured; - -/** - * Note that this test cannot be placed under the relevant {@code -deployment} module because then the DEV UI processor would - * not be able to locate the template resources correctly. - */ -public class DevConsoleHibernateOrmActiveFalseTest { - - @RegisterExtension - static final QuarkusDevModeTest test = new QuarkusDevModeTest() - .withApplicationRoot((jar) -> jar.addAsResource( - new StringAsset("quarkus.datasource.db-kind=h2\n" - + "quarkus.datasource.jdbc.url=jdbc:h2:mem:test\n" - // Hibernate ORM is inactive: the dev console should be empty. - + "quarkus.hibernate-orm.active=false\n"), - "application.properties") - .addClasses(MyEntity.class)); - - @Test - public void testLegacyPages() { - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/persistence-units") - .then() - .statusCode(200) - .body(Matchers.containsString("No persistence units found")); - - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/managed-entities") - .then() - .statusCode(200) - .body(Matchers.containsString("No persistence units were found")); - - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/named-queries") - .then() - .statusCode(200) - .body(Matchers.containsString("No persistence units were found")); - } -} diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmSmokeTest.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmSmokeTest.java deleted file mode 100644 index 542c8f0c461fd..0000000000000 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/DevConsoleHibernateOrmSmokeTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package io.quarkus.test.devconsole; - -import org.hamcrest.Matchers; -import org.jboss.shrinkwrap.api.asset.StringAsset; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.RegisterExtension; - -import io.quarkus.test.QuarkusDevModeTest; -import io.restassured.RestAssured; - -/** - * Note that this test cannot be placed under the relevant {@code -deployment} module because then the DEV UI processor would - * not be able to locate the template resources correctly. - */ -public class DevConsoleHibernateOrmSmokeTest { - - @RegisterExtension - static final QuarkusDevModeTest test = new QuarkusDevModeTest() - .withApplicationRoot((jar) -> jar.addAsResource( - new StringAsset("quarkus.datasource.db-kind=h2\n" - + "quarkus.datasource.jdbc.url=jdbc:h2:mem:test\n"), - "application.properties") - .addClasses(MyEntity.class)); - - @Test - public void testLegacyPages() { - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/persistence-units") - .then() - .statusCode(200) - .body(Matchers.containsString("Persistence Unit <default>")); - - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/managed-entities") - .then() - .statusCode(200) - .body(Matchers.containsString("io.quarkus.test.devconsole.MyEntity")); - - RestAssured.get("q/dev-v1/io.quarkus.quarkus-hibernate-orm/named-queries") - .then() - .statusCode(200) - .body(Matchers.containsString("No named queries were found.")); - } -} diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/MyEntity.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/MyEntity.java deleted file mode 100644 index 02e4de6f0fd29..0000000000000 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/MyEntity.java +++ /dev/null @@ -1,16 +0,0 @@ -package io.quarkus.test.devconsole; - -import jakarta.persistence.Column; -import jakarta.persistence.Entity; -import jakarta.persistence.Id; - -@Entity -public class MyEntity { - - @Id - Long id; - - @Column - String field; - -} diff --git a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/namedpu/MyNamedPuEntity.java b/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/namedpu/MyNamedPuEntity.java deleted file mode 100644 index 203edc992a168..0000000000000 --- a/integration-tests/devmode/src/test/java/io/quarkus/test/devconsole/namedpu/MyNamedPuEntity.java +++ /dev/null @@ -1,14 +0,0 @@ -package io.quarkus.test.devconsole.namedpu; - -import jakarta.persistence.Entity; -import jakarta.persistence.Id; - -@Entity -public class MyNamedPuEntity { - - @Id - Long id; - - String field; - -}