You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@polaris.apache.org by sn...@apache.org on 2026/05/30 07:27:03 UTC
(polaris) branch main updated: BOM: Add missing dependencies and add a verification (#4569)
This is an automated email from the ASF dual-hosted git repository.
snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 4a45d6333b BOM: Add missing dependencies and add a verification (#4569)
4a45d6333b is described below
commit 4a45d6333bf1392e812bb526a9ba6029d4064665
Author: Robert Stupp <sn...@snazy.de>
AuthorDate: Sat May 30 09:26:59 2026 +0200
BOM: Add missing dependencies and add a verification (#4569)
A couple of recently added Gradle projects were missing in the BOM. This change adds those.
To prevent in the future, this change also adds a check that projects are either declared as a dependency constraint or explicitly mentioned as excluded.
---
bom/build.gradle.kts | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/bom/build.gradle.kts b/bom/build.gradle.kts
index ecc5f89233..90cc539274 100644
--- a/bom/build.gradle.kts
+++ b/bom/build.gradle.kts
@@ -21,6 +21,8 @@ plugins { id("polaris-bom") }
description = "Apache Polaris - Bill of Materials (BOM)"
+val ideaActive = System.getProperty("idea.active").toBoolean()
+
dependencies {
constraints {
api(rootProject)
@@ -46,6 +48,7 @@ dependencies {
api(project(":polaris-idgen-api"))
api(project(":polaris-idgen-impl"))
api(project(":polaris-idgen-spi"))
+ api(project(":polaris-idgen-mocks"))
api(project(":polaris-nodes-api"))
api(project(":polaris-nodes-impl"))
@@ -92,6 +95,20 @@ dependencies {
api(project(":polaris-relational-jdbc"))
api(project(":polaris-extensions-auth-opa"))
+ api(project(":polaris-extensions-auth-opa-tests"))
+ api(project(":polaris-extensions-auth-ranger"))
+ api(project(":polaris-extensions-auth-ranger-tests"))
+ api(project(":polaris-extensions-federation-bigquery"))
+ api(project(":polaris-extensions-federation-hadoop"))
+ api(project(":polaris-extensions-federation-hive"))
+ api(project(":polaris-hms-testcontainer"))
+
+ api(project(":polaris-spark-3.5_2.12"))
+ api(project(":polaris-spark-integration-3.5_2.12"))
+ if (!ideaActive) {
+ api(project(":polaris-spark-3.5_2.13"))
+ api(project(":polaris-spark-integration-3.5_2.13"))
+ }
api(project(":polaris-admin"))
api(project(":polaris-runtime-common"))
@@ -104,3 +121,46 @@ dependencies {
api(project(":polaris-tests"))
}
}
+
+tasks.register("verifyBomDependencies") {
+ group = "verification"
+ description = "Checks if the BOM dependencies are complete"
+
+ actions.addLast {
+ // Projects that shall not be referenced from the BOM.
+ val nonBomProjects =
+ setOf(
+ ":polaris-bom",
+ ":aggregated-license-report",
+ ":polaris-config-docs-site",
+ ":polaris-distribution",
+ )
+
+ val apiConfig = configurations.api.get()
+ val declaredGroupName =
+ apiConfig.dependencyConstraints.filterIsInstance<DependencyConstraint>().map {
+ "${it.group}:${it.name}"
+ }
+
+ val missingProjectPaths =
+ rootProject.allprojects
+ .filter {
+ !declaredGroupName.contains("${it.group}:${it.name}") && !nonBomProjects.contains(it.path)
+ }
+ .map { it.path }
+ .sorted()
+
+ if (!missingProjectPaths.isEmpty()) {
+ logger.error(
+ "The dependencies declared in ${project.projectDir.relativeTo(rootProject.projectDir)} might be incomplete, the following delcarations might be missing:"
+ )
+ missingProjectPaths.forEach { logger.error(" api(project(\"$it\"))") }
+
+ throw GradleException(
+ "The dependencies declared in ${project.projectDir.relativeTo(rootProject.projectDir)} might be incomplete, see logged errors above."
+ )
+ }
+ }
+}
+
+tasks.named("check") { dependsOn("verifyBomDependencies") }