From 31c86161d6c70905b4ebdaf455bf5b1517e8f11a Mon Sep 17 00:00:00 2001 From: MonkeyCanCode Date: Fri, 2 Aug 2024 17:12:05 -0500 Subject: [PATCH] Enable eclipselink for metastore (#47) This PR will enable eclipselink by default with H2 as backend metastore. This is based off changes from #41. --- build.gradle | 4 ++++ extension/persistence/eclipselink/build.gradle | 3 ++- polaris-server.yml | 2 ++ polaris-service/build.gradle | 3 ++- 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 7277046ec..3f66b04c1 100644 --- a/build.gradle +++ b/build.gradle @@ -64,6 +64,10 @@ subprojects { apply plugin: "java-library" } + project(":polaris-eclipselink") { + apply plugin: "java-library" + } + dependencies { implementation(platform(libs.jackson.bom)) implementation("com.fasterxml.jackson.core:jackson-annotations") diff --git a/extension/persistence/eclipselink/build.gradle b/extension/persistence/eclipselink/build.gradle index 69f165e0a..91fb0c9c7 100644 --- a/extension/persistence/eclipselink/build.gradle +++ b/extension/persistence/eclipselink/build.gradle @@ -16,10 +16,11 @@ dependencies { implementation(project(":polaris-core")) - implementation(project(":polaris-service")) + runtimeOnly(project(":polaris-service")) implementation(libs.eclipselink) implementation(platform(libs.dropwizard.bom)) implementation("io.dropwizard:dropwizard-jackson") + implementation(libs.h2) // Different dependencies will be needed for different backend databases testImplementation(libs.h2) testImplementation(testFixtures(project(":polaris-core"))) diff --git a/polaris-server.yml b/polaris-server.yml index 886221937..cdfeb7027 100644 --- a/polaris-server.yml +++ b/polaris-server.yml @@ -89,6 +89,8 @@ defaultRealms: metaStoreManager: type: in-memory + # type: eclipse-link # uncomment to use eclipse-link as metastore + # persistence-unit: polaris-dev # TODO - avoid duplicating token broker config oauth2: diff --git a/polaris-service/build.gradle b/polaris-service/build.gradle index 16c3e6951..37106acd8 100644 --- a/polaris-service/build.gradle +++ b/polaris-service/build.gradle @@ -21,7 +21,8 @@ plugins { dependencies { implementation(project(":polaris-core")) - + implementation(project(":polaris-eclipselink")) + implementation(platform(libs.iceberg.bom)) implementation("org.apache.iceberg:iceberg-api") implementation("org.apache.iceberg:iceberg-core")