Skip to content
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
9 changes: 8 additions & 1 deletion extension/persistence/eclipselink/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,11 @@ dependencies {
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}

sourceSets { test { resources { srcDir("src/test/data") } } }
tasks.register<Jar>("archiveConf") {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tip (not a change request) to avoid string-typo-errors in such cases:

val archiveConf by tasks.registering(Jar::class) {
...
}

tasks.named("test") { dependsOn(archiveConf) }

archiveFileName = "conf.jar"
destinationDirectory = layout.buildDirectory.dir("conf")

from("src/test/resources/META-INF/") { include("persistence.xml") }
}

tasks.named("test") { dependsOn("archiveConf") }
Original file line number Diff line number Diff line change
Expand Up @@ -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">

<persistence-unit name="polaris-dev" transaction-type="RESOURCE_LOCAL">
<persistence-unit name="polaris" transaction-type="RESOURCE_LOCAL">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<class>io.polaris.core.persistence.models.ModelEntity</class>
<class>io.polaris.core.persistence.models.ModelEntityActive</class>
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private static class CreateStoreSessionArgs implements ArgumentsProvider {
public Stream<? extends Arguments> 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));
}
}
Expand Down