diff --git a/extension/persistence/eclipselink/build.gradle.kts b/extension/persistence/eclipselink/build.gradle.kts index fdad53db0..4fbb555de 100644 --- a/extension/persistence/eclipselink/build.gradle.kts +++ b/extension/persistence/eclipselink/build.gradle.kts @@ -37,4 +37,11 @@ dependencies { testRuntimeOnly("org.junit.platform:junit-platform-launcher") } -sourceSets { test { resources { srcDir("src/test/data") } } } +tasks.register("archiveConf") { + archiveFileName = "conf.jar" + destinationDirectory = layout.buildDirectory.dir("conf") + + from("src/test/resources/META-INF/") { include("persistence.xml") } +} + +tasks.named("test") { dependsOn("archiveConf") } diff --git a/polaris-service/src/test/resources/META-INF/persistence.xml b/extension/persistence/eclipselink/src/main/resources/META-INF/persistence.xml similarity index 96% rename from polaris-service/src/test/resources/META-INF/persistence.xml rename to extension/persistence/eclipselink/src/main/resources/META-INF/persistence.xml index db8c1c4bd..11828b284 100644 --- a/polaris-service/src/test/resources/META-INF/persistence.xml +++ b/extension/persistence/eclipselink/src/main/resources/META-INF/persistence.xml @@ -20,7 +20,7 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"> - + org.eclipse.persistence.jpa.PersistenceProvider io.polaris.core.persistence.models.ModelEntity io.polaris.core.persistence.models.ModelEntityActive diff --git a/extension/persistence/eclipselink/src/test/data/eclipselink_conf.jar b/extension/persistence/eclipselink/src/test/data/eclipselink_conf.jar deleted file mode 100644 index 7f0a47fd7..000000000 Binary files a/extension/persistence/eclipselink/src/test/data/eclipselink_conf.jar and /dev/null differ diff --git a/extension/persistence/eclipselink/src/test/java/io/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreTest.java b/extension/persistence/eclipselink/src/test/java/io/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreTest.java index 32b4169d6..19cea32cf 100644 --- a/extension/persistence/eclipselink/src/test/java/io/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreTest.java +++ b/extension/persistence/eclipselink/src/test/java/io/polaris/extension/persistence/impl/eclipselink/PolarisEclipseLinkMetaStoreTest.java @@ -82,7 +82,7 @@ private static class CreateStoreSessionArgs implements ArgumentsProvider { public Stream provideArguments(ExtensionContext extensionContext) { return Stream.of( Arguments.of("META-INF/persistence.xml", true), - Arguments.of("eclipselink_conf.jar!/persistence.xml", true), + Arguments.of("./build/conf/conf.jar!/persistence.xml", true), Arguments.of("/dummy_path/conf.jar!/persistence.xml", false)); } } diff --git a/polaris-service/src/main/resources/META-INF/persistence.xml b/extension/persistence/eclipselink/src/test/resources/META-INF/persistence.xml similarity index 100% rename from polaris-service/src/main/resources/META-INF/persistence.xml rename to extension/persistence/eclipselink/src/test/resources/META-INF/persistence.xml