From 800530756d70231f1d31e52e9d8404ce89267ea4 Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Tue, 8 Jul 2025 15:58:43 +0200 Subject: [PATCH 1/5] test: add src/it source only for generate-test-sources phase --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3be085185..e93ced9a8 100644 --- a/pom.xml +++ b/pom.xml @@ -343,7 +343,7 @@ add-test-source - process-resources + generate-test-sources add-test-source From 42f6742f5f05c7c0cd263607d0d16e942349fa0b Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Tue, 8 Jul 2025 18:40:16 +0200 Subject: [PATCH 2/5] refactor: do not use lombok in Container.java --- src/it/java/io/weaviate/containers/Container.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/it/java/io/weaviate/containers/Container.java b/src/it/java/io/weaviate/containers/Container.java index ee8859a18..4a95b4044 100644 --- a/src/it/java/io/weaviate/containers/Container.java +++ b/src/it/java/io/weaviate/containers/Container.java @@ -11,7 +11,6 @@ import org.testcontainers.lifecycle.Startable; import io.weaviate.client6.v1.api.WeaviateClient; -import lombok.RequiredArgsConstructor; public class Container { public static final Weaviate WEAVIATE = Weaviate.createDefault(); @@ -85,10 +84,13 @@ public TestRule asTestRule() { }; } - @RequiredArgsConstructor public static class PerTestSuite implements TestRule { private final Startable container; + public PerTestSuite(Startable container) { + this.container = container; + } + @Override public Statement apply(Statement base, Description description) { return new Statement() { From 360d75d916f09a6b920cc4d7ec75f45c140e9c75 Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Tue, 8 Jul 2025 18:41:04 +0200 Subject: [PATCH 3/5] ci: migrate to central-publishing-maven-plugin OSSRH platform was sunset on June 30, 2025 and the recommended way to publish Maven artifacts is now via 'central-publishing-maven-plugin'. https://central.sonatype.org/pages/ossrh-eol/ The new Publishing Platform doubles as a staging server and will verify the artifact's checksums and GPG-signatures. 1. We replace nexus-staging-maven-plugin with central-publishing-maven-plugin and drop the explicit configuration (we use the plugin's default configuration). 2. Default settings for 'mvn deploy' is to NOT auto-publish and out wait until the artifact is 'verified'. We override these in our GitHub CI to autoPublish=true and waitUntil=published. This allows testing deployment changes and running mvn-deploy locally without running a risk of accidentally publishing an artifact. 3. Move ./decrypt_secret.sh to tools/ and add an encrypt_secret.sh script for convenience 4. Update create-release.yaml GH workflow --- .github/workflows/create-release.yaml | 7 ++- pom.xml | 55 ++++++++------------ decrypt_secret.sh => tools/decrypt_secret.sh | 1 + tools/encrypt_secret.sh | 27 ++++++++++ 4 files changed, 55 insertions(+), 35 deletions(-) rename decrypt_secret.sh => tools/decrypt_secret.sh (96%) create mode 100755 tools/encrypt_secret.sh diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index fa23a1aa4..5a639615c 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -16,7 +16,7 @@ jobs: env: GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} run: | - ./decrypt_secret.sh + ./tools/decrypt_secret.sh - name: Deploy env: OKTA_DUMMY_CI_PW: ${{ secrets.OKTA_DUMMY_CI_PW }} @@ -26,7 +26,10 @@ jobs: run: | export GPG_TTY=$(tty) mvn -DskipTests clean package - mvn -s settings.xml deploy + mvn -s settings.xml \ + -Dcentral-publishing.autoPublish=true \ + -Dcentral-publishing.waitUntil=published \ + deploy - name: Archive artifacts uses: actions/upload-artifact@v4 with: diff --git a/pom.xml b/pom.xml index e93ced9a8..8576d7044 100644 --- a/pom.xml +++ b/pom.xml @@ -7,8 +7,8 @@ jar 6.0.0-SNAPSHOT - Weaviate Java Client - A Java client for Weaviate Vector Search Engine + ${project.groupId}:${project.artifactId} + Official Java client for Weaviate Vector Search Engine https://github.com/weaviate/java-client @@ -45,17 +45,6 @@ 6.0.0-beta2 - - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots/ - - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ - - - UTF-8 UTF-8 @@ -392,7 +381,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.2.8 sign-artifacts @@ -401,9 +390,9 @@ sign + true - ${gpg.keyname} - ${gpg.keyname} + true --batch --pinentry-mode @@ -421,6 +410,10 @@ maven-install-plugin 3.0.0-M1 + + + + maven-deploy-plugin 3.0.0-M1 @@ -428,26 +421,22 @@ true + - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.13 + org.sonatype.central + central-publishing-maven-plugin + 0.8.0 true - - - default-deploy - deploy - - deploy - - - - ossrh - https://s01.oss.sonatype.org - true + + + + + ${central-publishing.autoPublish} + ${central-publishing.waitUntil} + maven-site-plugin 3.9.1 @@ -484,8 +473,8 @@ maven-gpg-plugin - org.sonatype.plugins - nexus-staging-maven-plugin + org.sonatype.central + central-publishing-maven-plugin diff --git a/decrypt_secret.sh b/tools/decrypt_secret.sh similarity index 96% rename from decrypt_secret.sh rename to tools/decrypt_secret.sh index c43ade4b5..672b524e0 100755 --- a/decrypt_secret.sh +++ b/tools/decrypt_secret.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash set -euo pipefail +# Options: # --batch to prevent interactive command # --yes to assume "yes" for questions gpg --quiet --batch --yes --decrypt --passphrase="$GPG_PASSPHRASE" --output secrets.tar secrets.tar.gpg diff --git a/tools/encrypt_secret.sh b/tools/encrypt_secret.sh new file mode 100755 index 000000000..5451af882 --- /dev/null +++ b/tools/encrypt_secret.sh @@ -0,0 +1,27 @@ +#!/usr/bin/env bash +set -euo pipefail + +# This script generates a GPG-ecrypted tarball with our signing GPG key +# and Maven Central Repository credentials. +# +# Make sure that key.gpg, settings.xml, and passphrase.env exist in the current directory. +# Delete these files after the script has run. Only commit secrets.tar.gpg! + +rm -f secrets.tar && + tar --no-xattrs -czf secrets.tar key.gpg settings.xml passphrase.env + +rm -f secrets.tar.gpg && + gpg --batch --symmetric \ + --passphrase "$GPG_PASSPHRASE" \ + --output secrets.tar.gpg \ + secrets.tar + +rm -f secrets.tar + +echo "Tarball secrets.tar.gpg generated successfully." +echo "Remember to delete the plaintext files. Only commit secrets.tar.gpg to source control!" +echo +echo " \$ git add secrets.tar.gpg && git commit -m 'ci: update secrets.tar.gpg'" +echo " \$ rm key.gpg settings.xml passphrase.env" +echo + From eff7a1e547447deb8a8f0397ab43d7d2d7f73af8 Mon Sep 17 00:00:00 2001 From: dyma solovei Date: Tue, 8 Jul 2025 23:02:04 +0200 Subject: [PATCH 4/5] ci: update secrets.tar.gpg settings.xml have new username and password for Central Maven Repository Publishing Platform. Removed configuration that was used to pass the GPG passphrase to gpg-maven-plugin, as the recommended method is via an env variable. Added autoPublish and waitUntil properties to control deployment behavior. --- secrets.tar.gpg | Bin 1384 -> 1600 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/secrets.tar.gpg b/secrets.tar.gpg index 78ea9a529a74068930320b0469a8a12cc0979673..26523a2f794604afc8a28f851ae52664b4e6637c 100644 GIT binary patch literal 1600 zcmV-G2EX}?4Fm}T2>W(jgH>e!asSfAZUOXF$GDX_8ARm+X-6WTCgAShj#=^a^e7d9 ziOF-DCe7#80)M(Q7};*Lo|y6u(WVD2^(K7{z)A=5x*8 zh+bW?u{|*8Xj;we_#&3u#>3GkSJ3AH9PR#V9iX-Da=EmR-k;iu$Co$2_Ez^jm))r3 zF$!}6nP!BMc-85eBmd*>qcH&9a4Sh%V>R@I1}jfZd?!P5&w*3sr%b(~4*88a(LD7c z)~C#_1D<+zbPmwZ3&7Q2=XGigGKx!TUrd}qz?`704aFH-KUL3S>oyq|rWZuC6~+hf z;%e6xh9GC*@Vn`RwZHoD;Y0)2>lFB&sp@I2$$ZiU!F-*yAxudc?RLixf*I1djz38c z)pM4@Q`rE##?_504#5GA0esH`JJqzgxfD^pN^;Y3Di0irbG>ZcBBuVH;)fFV-}*cd zYa0C@sM%F81c;!x#<%jGL+kf9d0llrMx8P}!{1EIaq6wSjsT8WNC_g*IEGfHrau|` z5FHiJD+|bN`GKv5Xs8WC5=i0McWecD2DJ*mv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9{%)xZk;Xe!qH0O{T5S(hn+SCIO%v-v8uOb<4V*MDHkoZ`O8bOyVn_rY1Yi=1zW2duK1VvB@L^z z7SS^3r6y?tp1Ov1yl4!G4n9X0W8`)HE_!XNKzXD>LkY=GmL;eC)ltr`XP6nLTX?9o ziR<#?^?DBp&y*oSe75u}Ro96MvvRpPo7rx2$1?HWpGw;-%WvlvO+sU}eQVZ30!Y~k z2pp>shTbR;MJPdKWK_t>;0?JNCmF$l0MJ zNk7n=Zo=FH*}%$pD_qwBh(L{o3_>|G)dxMT$SGF;h@Hx5bJxf;SYl7~L8x^@5_TJRkgx9#{i zpa}I7{rcNi=3zF&U!n%DXz)_-+t>Ih@=6|4eL)ORHa(kovb^TW105}Fg zJ0J(~VyuTqqJ|4M83XV5;^~;kPBnO`7_ymR zm|9ZFS1ws>;&2C@+NspxxS1yaNq&c?qH8Jn({l7AYrX!zK=&%=VE^+dZa-?YsPCV+ zE#{Jpa(cT%KHaq4`83q#k1!$R^?Q?^nf!oCTD)J(%eB0cL3-3+k+6fGDigdBLuXg$ zO(wvd00LKGz?GrPhHZ<@lCo({`8f{Nz1rznAHR58%^fP|fncNuedCddGJH1R%81;8 zycvDMB zjeTlBP4KHsaa<9{&MY(2F||rY% zS<+Almz28iOk1r{M{Ly%cs!~>ygKS@Krs_r_lI>YKp{(#*Kp2N4u1Nv*-DVR|J1Gc qCG6dMNUiWtp=(jKbfD1$m$^rH!@Q{3JY#uG<5A2g#Qw#g=JX_!&A Date: Wed, 9 Jul 2025 09:01:33 +0200 Subject: [PATCH 5/5] fix(ci): source passphrase.env before running mvn deploy --- .github/workflows/create-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/create-release.yaml b/.github/workflows/create-release.yaml index 5a639615c..f2fdf745d 100644 --- a/.github/workflows/create-release.yaml +++ b/.github/workflows/create-release.yaml @@ -25,6 +25,7 @@ jobs: AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} run: | export GPG_TTY=$(tty) + source ./passphrase.env # load $MAVEN_GPG_PASSHRASE for maven-gpg-plugin mvn -DskipTests clean package mvn -s settings.xml \ -Dcentral-publishing.autoPublish=true \