From f922aa244983be16e33d33d8500caac5195288e0 Mon Sep 17 00:00:00 2001 From: Dominik Przybysz <132913826+sfc-gh-dprzybysz@users.noreply.github.com> Date: Thu, 1 Feb 2024 07:52:20 +0100 Subject: [PATCH] SNOW-1003783: Fix multi-release jar entries (#1621) --- FIPS/pom.xml | 36 ++++++++++++-- ci/scripts/check_content.sh | 5 ++ pom.xml | 97 ++++++++++++++++--------------------- 3 files changed, 78 insertions(+), 60 deletions(-) diff --git a/FIPS/pom.xml b/FIPS/pom.xml index 9071dd0bd..e7b0f6ccf 100644 --- a/FIPS/pom.xml +++ b/FIPS/pom.xml @@ -567,10 +567,7 @@ META-INF/DEPENDENCIES META-INF/maven/** META-INF/services/com.fasterxml.* - - - META-INF/versions/17/** - META-INF/versions/19/** + META-INF/versions/9/module-info.* META-INF/*.xml META-INF/*.SF META-INF/*.DSA @@ -618,6 +615,37 @@ + + + + org.apache.maven.plugins + maven-antrun-plugin + + + repack + + run + + package + + + + + + + + + + + + + + + + + + + diff --git a/ci/scripts/check_content.sh b/ci/scripts/check_content.sh index d2922fe7a..a9c0768b6 100755 --- a/ci/scripts/check_content.sh +++ b/ci/scripts/check_content.sh @@ -12,3 +12,8 @@ if jar tvf $DIR/../../target/snowflake-jdbc${package_modifier}.jar | awk '{prin echo "[ERROR] JDBC jar includes class not under the snowflake namespace" exit 1 fi + +if jar tvf $DIR/../../target/snowflake-jdbc${package_modifier}.jar | awk '{print $8}' | grep -E "^META-INF/versions/.*.class" | grep -v -E "^META-INF/versions/.*/(net|com)/snowflake"; then + echo "[ERROR] JDBC jar includes multi release classes not under the snowflake namespace" + exit 1 +fi diff --git a/pom.xml b/pom.xml index e28976451..146b1367f 100644 --- a/pom.xml +++ b/pom.xml @@ -167,7 +167,6 @@ groupId,artifactId true true - groupId,artifactId true stop strict @@ -609,33 +608,6 @@ - - - - org.apache.maven.plugins - maven-antrun-plugin - - - repack - - run - - package - - - - - - - - - - - - - - - org.apache.maven.plugins @@ -697,7 +669,6 @@ META-INF/NOTICE* META-INF/DEPENDENCIES META-INF/maven/** - META-INF/services/com.fasterxml.* META-INF/*.xml META-INF/*.SF META-INF/*.DSA @@ -781,33 +752,6 @@ - - - - org.apache.maven.plugins - maven-antrun-plugin - - - repack - - run - - package - - - - - - - - - - - - - - - org.apache.maven.plugins @@ -1010,6 +954,7 @@ META-INF/DEPENDENCIES META-INF/maven/** META-INF/services/com.fasterxml.* + META-INF/versions/9/module-info.* META-INF/*.xml META-INF/*.SF META-INF/*.DSA @@ -1059,6 +1004,46 @@ + + + + org.apache.maven.plugins + maven-antrun-plugin + + + repack + + run + + package + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.codehaus.mojo buildnumber-maven-plugin