From 4ab9ea055922eea6272953bdd93dda7d9ed2990b Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Tue, 16 Jun 2026 11:09:37 +0200 Subject: [PATCH 1/5] chore: added an sbom task for attaching sboms to github releases --- .github/workflows/release_jreleaser.yml | 8 +++ pom.xml | 86 +++++++++++++++++++------ 2 files changed, 75 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release_jreleaser.yml b/.github/workflows/release_jreleaser.yml index c9c6878ca..c13c74a7c 100644 --- a/.github/workflows/release_jreleaser.yml +++ b/.github/workflows/release_jreleaser.yml @@ -54,6 +54,14 @@ jobs: JRELEASER_GPG_SECRET_KEY: ${{ secrets.JRELEASER_GPG_SECRET_KEY }} JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.JRELEASER_MAVENCENTRAL_USERNAME }} JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.JRELEASER_MAVENCENTRAL_TOKEN }} + - name: Generate SBOM + run: | + mvn --no-transfer-progress --batch-mode org.cyclonedx:cyclonedx-maven-plugin:makeAggregateBom + - name: Attach SBOM to GitHub release + run: | + gh release upload "v${{ github.event.inputs.version }}" target/unleash-client-java-sbom.json --clobber + env: + GH_TOKEN: ${{ steps.generate-token.outputs.token }} - name: Set next version run: | mvn --no-transfer-progress --batch-mode versions:set -DnewVersion=${{ github.event.inputs.nextVersion }}-SNAPSHOT diff --git a/pom.xml b/pom.xml index 20fa19b23..a7e826edc 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,9 @@ - - + + 4.0.0 io.getunleash unleash-client-java @@ -53,8 +57,10 @@ https://github.com/Unleash/unleash-java-sdk - scm:git:https://github.com/Unleash/unleash-java-sdk.git - scm:git:https://github.com/Unleash/unleash-java-sdk.git + scm:git:https://github.com/Unleash/unleash-java-sdk.git + scm:git:https://github.com/Unleash/unleash-java-sdk.git @@ -156,6 +162,33 @@ + + org.cyclonedx + cyclonedx-maven-plugin + 2.7.9 + + + package + + makeAggregateBom + + + + + application + 1.7 + true + true + true + true + true + false + true + true + all + unleash-client-java-sbom + + org.apache.maven.plugins maven-dependency-plugin @@ -188,7 +221,8 @@ 3.5.2 1 - @{argLine} -javaagent:${org.mockito:mockito-core:jar} + @{argLine} -javaagent:${org.mockito:mockito-core:jar} @@ -198,8 +232,10 @@ - true - true + true + true @@ -235,9 +271,11 @@ https://github.com - Unleash/client-specification/archive/v${version.unleash.specification}.zip + Unleash/client-specification/archive/v${version.unleash.specification}.zip - ${project.build.directory}/client-specification + ${project.build.directory}/client-specification @@ -261,7 +299,8 @@ ${project.build.directory}/client-specification/v${version.unleash.specification}.zip - ${project.build.directory}/client-specification/ + ${project.build.directory}/client-specification/ @@ -281,7 +320,8 @@ copy-resources - ${project.build.testOutputDirectory}/client-specification + ${project.build.testOutputDirectory}/client-specification @@ -325,8 +365,10 @@ ALWAYS - https://central.sonatype.com/api/v1/publisher - target/staging-deploy + https://central.sonatype.com/api/v1/publisher + target/staging-deploy 60 40 @@ -402,7 +444,8 @@ maven-surefire-plugin 3.5.2 - @{argLine} -javaagent:${org.mockito:mockito-core:jar} + @{argLine} -javaagent:${org.mockito:mockito-core:jar} @@ -414,13 +457,15 @@ false - https://s01.oss.sonatype.org/content/repositories/snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots sonatype-nexus-snapshots Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots + https://oss.sonatype.org/content/repositories/snapshots false @@ -438,7 +483,8 @@ sonatype-nexus-staging Nexus Release Repository - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -507,7 +553,8 @@ publication - local::file:./target/staging-deploy + local::file:./target/staging-deploy deploy @@ -553,7 +600,8 @@ sonatype-nexus-staging Nexus Release Repository - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ From 84268b0ab8737041703572aed3edc6137c17921d Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Tue, 16 Jun 2026 12:06:54 +0200 Subject: [PATCH 2/5] chore: avoid unnecessary line changes --- pom.xml | 55 ++++++++++++++++++++++--------------------------------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/pom.xml b/pom.xml index a7e826edc..b701ff6a8 100644 --- a/pom.xml +++ b/pom.xml @@ -57,10 +57,8 @@ https://github.com/Unleash/unleash-java-sdk - scm:git:https://github.com/Unleash/unleash-java-sdk.git - scm:git:https://github.com/Unleash/unleash-java-sdk.git + scm:git:https://github.com/Unleash/unleash-java-sdk.git + scm:git:https://github.com/Unleash/unleash-java-sdk.git @@ -299,8 +297,7 @@ ${project.build.directory}/client-specification/v${version.unleash.specification}.zip - ${project.build.directory}/client-specification/ + ${project.build.directory}/client-specification/ @@ -365,10 +362,8 @@ ALWAYS - https://central.sonatype.com/api/v1/publisher - target/staging-deploy + https://central.sonatype.com/api/v1/publisher + target/staging-deploy 60 40 @@ -444,8 +439,7 @@ maven-surefire-plugin 3.5.2 - @{argLine} -javaagent:${org.mockito:mockito-core:jar} + @{argLine} -javaagent:${org.mockito:mockito-core:jar} @@ -457,15 +451,13 @@ false - https://s01.oss.sonatype.org/content/repositories/snapshots + https://s01.oss.sonatype.org/content/repositories/snapshots sonatype-nexus-snapshots Sonatype Nexus Snapshots - https://oss.sonatype.org/content/repositories/snapshots + https://oss.sonatype.org/content/repositories/snapshots false @@ -483,8 +475,7 @@ sonatype-nexus-staging Nexus Release Repository - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ @@ -535,17 +526,17 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.7.0 - true - - ossrh - https://s01.oss.sonatype.org/ - true - - + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.7.0 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + @@ -553,8 +544,7 @@ publication - local::file:./target/staging-deploy + local::file:./target/staging-deploy deploy @@ -600,8 +590,7 @@ sonatype-nexus-staging Nexus Release Repository - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ From 4f45e8604b54574594a2c89a8e1aada9e2887c01 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Tue, 16 Jun 2026 12:54:25 +0200 Subject: [PATCH 3/5] chore: more xml format tweaking --- pom.xml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index b701ff6a8..e3054652b 100644 --- a/pom.xml +++ b/pom.xml @@ -230,10 +230,8 @@ - true - true + true + true From a1719914b862269b335314d0f98c655456a77005 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Tue, 16 Jun 2026 12:54:55 +0200 Subject: [PATCH 4/5] chore: argLine formatting --- pom.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index e3054652b..508b701fe 100644 --- a/pom.xml +++ b/pom.xml @@ -219,8 +219,7 @@ 3.5.2 1 - @{argLine} -javaagent:${org.mockito:mockito-core:jar} + @{argLine} -javaagent:${org.mockito:mockito-core:jar} From 537ed54d5ce6e89cd45feef10e187a729be89418 Mon Sep 17 00:00:00 2001 From: Christopher Kolstad Date: Tue, 16 Jun 2026 12:56:12 +0200 Subject: [PATCH 5/5] chore: formatting --- pom.xml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 508b701fe..4ecc0dd26 100644 --- a/pom.xml +++ b/pom.xml @@ -266,11 +266,8 @@ https://github.com - Unleash/client-specification/archive/v${version.unleash.specification}.zip - - ${project.build.directory}/client-specification + Unleash/client-specification/archive/v${version.unleash.specification}.zip + ${project.build.directory}/client-specification @@ -314,8 +311,7 @@ copy-resources - ${project.build.testOutputDirectory}/client-specification + ${project.build.testOutputDirectory}/client-specification