diff --git a/buildSrc/src/main/groovy/openhouse.maven-publish.gradle b/buildSrc/src/main/groovy/openhouse.maven-publish.gradle index 718cf08b..45702fbd 100644 --- a/buildSrc/src/main/groovy/openhouse.maven-publish.gradle +++ b/buildSrc/src/main/groovy/openhouse.maven-publish.gradle @@ -40,13 +40,6 @@ def configurePom(pom) { developerConnection = 'scm:git:ssh://github.com/linkedin/openhouse.git' url = 'https://github.com/linkedin/openhouse' } - - pom.withXml { - asNode().dependencies.first().each { - // Change the scope from runtime to compile - it.get("scope").first().value = 'compile' - } -} } publishing { diff --git a/integrations/spark/openhouse-spark-itest/build.gradle b/integrations/spark/openhouse-spark-itest/build.gradle index 2d4c37c0..950edca7 100644 --- a/integrations/spark/openhouse-spark-itest/build.gradle +++ b/integrations/spark/openhouse-spark-itest/build.gradle @@ -15,7 +15,7 @@ dependencies { // These classes are available from `client-codegen-convention.gradle` exclude group: "io.netty" } - + testImplementation project(':tables-test-fixtures_2.12') testImplementation 'org.junit.platform:junit-platform-runner:1.11.0' testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.11.0' diff --git a/tables-test-fixtures/build.gradle b/tables-test-fixtures/build.gradle index cf89ae03..dd6393bb 100644 --- a/tables-test-fixtures/build.gradle +++ b/tables-test-fixtures/build.gradle @@ -17,9 +17,14 @@ configurations { dependencies { implementation 'org.junit.jupiter:junit-jupiter-engine:' + junit_version implementation 'org.springframework.boot:spring-boot-starter-test:' + spring_web_version - implementation ((project(':services:tables'))) { - exclude group: 'org.apache.iceberg' + implementation(project(':services:tables')) { + exclude group: 'org.apache.hadoop' + exclude group: 'org.testcontainers' + exclude group: 'org.ow2.asm' + exclude group: 'org.xerial' + exclude group: 'javax' } + compileOnly 'org.springframework.boot:spring-boot-starter-tomcat:' + spring_web_version compileOnly('org.apache.spark:spark-sql_2.12:' + spark_version){ // These classes are available from `client-codegen-convention.gradle` @@ -27,12 +32,30 @@ dependencies { } implementation 'org.springframework.boot:spring-boot-starter-webflux:' + spring_web_version - implementation 'org.springframework.boot:spring-boot-starter-data-jpa:' + spring_web_version - implementation 'org.springframework.boot:spring-boot-starter-actuator:2.7.8' + implementation ('org.springframework.boot:spring-boot-starter-data-jpa:' + spring_web_version) { + exclude(group: 'org.springframework', module: 'spring-aspects') + exclude(group: 'org.springframework.boot', module: 'spring-boot-starter-aop') + } + + implementation ('org.springframework.boot:spring-boot-starter-actuator:2.7.8') { + exclude(group: 'io.micrometer', module: 'micrometer-core') + } implementation group: 'com.zaxxer', name: 'HikariCP', version: '4.0.3' compileOnly('org.projectlombok:lombok:' + '1.18.20') - implementation project(':cluster:storage') - implementation project(':iceberg:openhouse:internalcatalog') + implementation (project(':cluster:storage')) { + exclude group: 'org.testcontainers' + exclude group: 'javax' + exclude group: 'org.xerial' + + } + implementation (project(':iceberg:openhouse:internalcatalog')) { + exclude group: 'org.apache.hadoop' + exclude group: 'org.ow2.asm' + exclude group: 'org.testcontainers' + exclude group: 'javax' + exclude group: 'org.xerial' + exclude group: 'com.h2database' + } testImplementation('org.apache.hadoop:hadoop-common:3.2.0'){ @@ -43,37 +66,118 @@ dependencies { } shadowJar { + + zip64 = true - // Required for Spring archiveClassifier.set('uber') - mergeServiceFiles() - append 'META-INF/spring.handlers' - append 'META-INF/spring.schemas' - append 'META-INF/spring.tooling' - transform(PropertiesFileTransformer) { - paths = ['META-INF/spring.factories'] - mergeStrategy = "append" - } dependencies { + + + + exclude(dependency('com.fasterxml.jackson.module::')) + exclude(dependency('com.fasterxml.jackson.core::')) + exclude(dependency('com.azure::')) + + exclude(dependency('ch.qos.logback::')) + exclude(dependency('org.apache.hadoop::')) exclude(dependency('org.apache.logging.log4j::')) exclude(dependency('org.slf4j::')) exclude(dependency('org.log4j::')) exclude(dependency('org.apache.log4j::')) - exclude(dependency('ch.qos.logback::')) - exclude(dependency('com.fasterxml.jackson.module::')) - exclude(dependency('com.fasterxml.jackson.core::')) - exclude(dependency('org.apache.hadoop::')) - // Exclude Spark dependencies exclude(dependency('org.apache.spark::')) - relocate('com', 'openhouse.relocated.com') { - exclude 'com.linkedin.openhouse.**' - exclude 'com.google.protobuf.**' - exclude 'com.google.gson.**' + + relocate('com.google', 'openhouse.relocated.com.google') + relocate('com.jayway', 'openhouse.relocated.com.jayway') + relocate('com.zaxxer', 'openhouse.relocated.com.zaxxer') + relocate('com.ctc', 'openhouse.relocated.com.ctc') + + relocate('org.codehaus', 'openhouse.relocated.org.codehaus') + relocate('org.hibernate', 'openhouse.relocated.org.hibernate') + relocate('org.reactivestreams', 'openhouse.relocated.org.reactivestreams') + relocate('org.junit', 'openhouse.relocated.org.junit') + relocate ('org.yaml.snakeyaml', 'openhouse.relocated.org.yaml.snakeyaml') + relocate ('org.json', 'openhouse.relocated.org.json') + + relocate('reactor', 'openhouse.relocated.reactor') + relocate('io', 'openhouse.relocated.io') { + exclude 'io.netty.resolver.dns.macos.**' // dynamically loaded classes } + relocate('net', 'openhouse.relocated.net') + relocate('junit', 'openhouse.relocated.junit') + relocate('antlr', 'openhouse.relocated.antlr') + relocate('aj', 'openhouse.relocated.aj') + relocate('edu', 'openhouse.relocated.edu') + + exclude("com/sun/**") + exclude("com/microsoft/**") + exclude("com/github/**") + exclude("com/jamesmurty/**") + exclude("com/jcraft/**") + exclude("com/nimbusds/**") + exclude("com/azure/**") + exclude("org/jboss/**") + + exclude("org/aopalliance/**") + exclude("org/aspectj/**") + exclude("org/atteo/**") + exclude("org/assertj/**") + exclude("org/checkerframework/**") + exclude("org/ehcache/**") + exclude("org/fusesource/**") + exclude("org/h2/**") + exclude("org/HdrHistogram/**") + exclude("org/hamcrest/**") + exclude("org/iq80/**") + exclude("org/jets3t/**") + exclude("org/intellij/**") + exclude("org/jetbrains/**") + exclude("org/jvnet/**") + exclude("org/jets3t/**") + exclude("org/jboss/**") + exclude("org/LatencyUtils/**") + exclude("org/mapstruct/**") + exclude("org/mockito/**") + exclude("org/mortbay/**") + exclude("org/objenesis/**") + exclude("org/objectweb/**") + exclude("org/openapitools/**") + exclude("org/opentest4j/**") + exclude("org/rnorth/**") + exclude("org/roaringbitmap/**") + exclude("org/skyscreamer/**") + exclude("org/springdoc/**") + //TODO: Relocate org.springframework if required. + exclude("org/terracotta/**") + exclude("org/testcontainers/**") + exclude("org/threeten/**") + exclude("org/xerial/**") + exclude("org/xmlunit/**") + exclude("org/znerd/**") - relocate('org', 'openhouse.relocated.org') {} + exclude("javax/**") + exclude("jline/**") + exclude("linux/**") + exclude("software/**") + exclude("contribs/**") + exclude("microsoft/**") + } + + exclude '**/public-suffix-list.txt' + exclude 'assets/**/**/**/**/**/**/*.properties' + exclude '**/*.dll' + exclude '**/*.dylib' + exclude '**/**/*.so' + + mergeServiceFiles() + + append 'META-INF/spring.handlers' + append 'META-INF/spring.schemas' + append 'META-INF/spring.tooling' + transform(PropertiesFileTransformer) { + paths = ['META-INF/spring.factories' ] + mergeStrategy = "append" } }