Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBX-2910: Make sure that the Exporter classes needed by plugin 'org.hibernate.eclipse.console' are visible and available #4928

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions jbt/src/main/java/org/hibernate/tool/hbm2x/DAOExporter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.hibernate.tool.hbm2x;

import org.hibernate.tool.internal.export.dao.DaoExporter;

public class DAOExporter extends DaoExporter {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package org.hibernate.tool.hbm2x;

public class GenericExporter extends org.hibernate.tool.internal.export.common.GenericExporter {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.hibernate.tool.hbm2x;

import org.hibernate.tool.internal.export.ddl.DdlExporter;

public class Hbm2DDLExporter extends DdlExporter {}
3 changes: 3 additions & 0 deletions jbt/src/main/java/org/hibernate/tool/hbm2x/QueryExporter.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package org.hibernate.tool.hbm2x;

public class QueryExporter extends org.hibernate.tool.internal.export.query.QueryExporter {}
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
package org.hibernate.tool.hbm2x;

import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;

import org.junit.jupiter.api.Test;

public class ExportersPresenceTest {

@Test
public void testHbm2DDLExporter() {
try {
ClassLoader cl = getClass().getClassLoader();
Class<?> ddlExporterClass = cl.loadClass("org.hibernate.tool.hbm2x.Hbm2DDLExporter");
assertNotNull(ddlExporterClass);
} catch (Throwable t) {
fail(t);
}
}

@Test
public void testPOJOExporter() {
try {
ClassLoader cl = getClass().getClassLoader();
Class<?> pojoExporterClass = cl.loadClass("org.hibernate.tool.hbm2x.POJOExporter");
assertNotNull(pojoExporterClass);
} catch (Throwable t) {
fail(t);
}
}

@Test
public void testHibernateMappingExporter() {
try {
ClassLoader cl = getClass().getClassLoader();
Class<?> hibernateMappingExporterClass = cl.loadClass("org.hibernate.tool.hbm2x.HibernateMappingExporter");
assertNotNull(hibernateMappingExporterClass);
} catch (Throwable t) {
fail(t);
}
}

@Test
public void testDAOExporter() {
try {
ClassLoader cl = getClass().getClassLoader();
Class<?> daoExporterClass = cl.loadClass("org.hibernate.tool.hbm2x.DAOExporter");
assertNotNull(daoExporterClass);
} catch (Throwable t) {
fail(t);
}
}

@Test
public void testGenericExporter() {
try {
ClassLoader cl = getClass().getClassLoader();
Class<?> genericExporterClass = cl.loadClass("org.hibernate.tool.hbm2x.GenericExporter");
assertNotNull(genericExporterClass);
} catch (Throwable t) {
fail(t);
}
}

@Test
public void testHibernateConfigurationExporter() {
try {
ClassLoader cl = getClass().getClassLoader();
Class<?> hibernateConfigurationExporterClass = cl.loadClass("org.hibernate.tool.hbm2x.HibernateConfigurationExporter");
assertNotNull(hibernateConfigurationExporterClass);
} catch (Throwable t) {
fail(t);
}
}

@Test
public void testQueryExporter() {
try {
ClassLoader cl = getClass().getClassLoader();
Class<?> hibernateConfigurationExporterClass = cl.loadClass("org.hibernate.tool.hbm2x.QueryExporter");
assertNotNull(hibernateConfigurationExporterClass);
} catch (Throwable t) {
fail(t);
}
}

}
Loading