From 0d1dcaa2c84c7d4ffbba785003023cdd0fe6558d Mon Sep 17 00:00:00 2001 From: Patrik Korytar Date: Thu, 3 Sep 2026 16:23:41 +0200 Subject: [PATCH 1/2] Integrate shared workflows --- .github/workflows/maven-mend.yml | 35 +++++++++++++++ .github/workflows/maven-pr.yml | 16 +++++++ .github/workflows/maven-push.yml | 56 ------------------------ .github/workflows/maven-release.yml | 25 +++++++++++ .github/workflows/maven-set-version.yml | 25 +++++++++++ .github/workflows/maven-snapshot.yml | 18 ++++++++ .github/workflows/maven-verify.yml | 45 ------------------- .github/workflows/validate-gh-action.yml | 12 +++++ pom.xml | 13 +++++- 9 files changed, 142 insertions(+), 103 deletions(-) create mode 100644 .github/workflows/maven-mend.yml create mode 100644 .github/workflows/maven-pr.yml delete mode 100644 .github/workflows/maven-push.yml create mode 100644 .github/workflows/maven-release.yml create mode 100644 .github/workflows/maven-set-version.yml create mode 100644 .github/workflows/maven-snapshot.yml delete mode 100644 .github/workflows/maven-verify.yml create mode 100644 .github/workflows/validate-gh-action.yml diff --git a/.github/workflows/maven-mend.yml b/.github/workflows/maven-mend.yml new file mode 100644 index 0000000..6f81abb --- /dev/null +++ b/.github/workflows/maven-mend.yml @@ -0,0 +1,35 @@ +name: Mend CLI scan for Maven + +on: + push: + branches: + - 1.x + +permissions: + contents: read + actions: read + checks: write + pull-requests: write + security-events: write + +jobs: + build: + uses: project-ncl/shared-github-actions/.github/workflows/maven-ci.yml@646d9b629925d6405fb06ed1476aefd6b2cdca86 # v0.0.23 + with: + java_version: "11" + build_command: "MAVEN_OPTS='-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m' mvn -B -V clean verify" + upload_artifacts: true + + call-mend-ci: + needs: build + uses: project-ncl/shared-github-actions/.github/workflows/mend-ci.yml@646d9b629925d6405fb06ed1476aefd6b2cdca86 # v0.0.23 + with: + project_name: "Commonjava/weft" + SCA: true + SAST: true + secrets: + MEND_URL: ${{ secrets.MEND_URL }} + MEND_USER_KEY: ${{ secrets.MEND_USER_KEY }} + MEND_EMAIL: ${{ secrets.MEND_EMAIL }} + MEND_ORGNAME: ${{ secrets.MEND_ORGNAME }} + MEND_PRODUCTNAME: ${{ secrets.MEND_PRODUCTNAME }} diff --git a/.github/workflows/maven-pr.yml b/.github/workflows/maven-pr.yml new file mode 100644 index 0000000..ea512a3 --- /dev/null +++ b/.github/workflows/maven-pr.yml @@ -0,0 +1,16 @@ +name: Java CI with Maven + +permissions: + contents: read + +on: + pull_request: + branches: ["1.x"] + +jobs: + call-maven-ci: + uses: project-ncl/shared-github-actions/.github/workflows/maven-ci.yml@646d9b629925d6405fb06ed1476aefd6b2cdca86 # v0.0.23 + with: + java_version: "11" + build_command: "MAVEN_OPTS='-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m' mvn -B -V clean verify" + upload_artifacts: true diff --git a/.github/workflows/maven-push.yml b/.github/workflows/maven-push.yml deleted file mode 100644 index 5dd64da..0000000 --- a/.github/workflows/maven-push.yml +++ /dev/null @@ -1,56 +0,0 @@ -# -# Copyright (C) 2013-2022 Red Hat, Inc. (https://github.com/Commonjava/weft) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: maven push - -on: [push] - -jobs: - build: - name: Build with maven - runs-on: ubuntu-latest - env: - MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m" - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 11 for x64 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - architecture: x64 - - - uses: s4u/maven-settings-action@v2.8.0 - with: - sonatypeSnapshots: true - - - uses: s4u/maven-settings-action@v2.8.0 - if: ${{ github.event_name == 'push' }} - with: - servers: | - [{ - "id": "central-portal-snapshots", - "username": "${{ secrets.SONATYPE_BOT_USERNAME }}", - "password": "${{ secrets.SONATYPE_BOT_TOKEN }}" - }] - - - name: Deploy the artifact - if: ${{ github.event_name == 'push' }} - run: mvn help:effective-settings -B -V clean deploy -e \ No newline at end of file diff --git a/.github/workflows/maven-release.yml b/.github/workflows/maven-release.yml new file mode 100644 index 0000000..ddd1ea2 --- /dev/null +++ b/.github/workflows/maven-release.yml @@ -0,0 +1,25 @@ +name: "0 Central Release Job" # Adding the 0 so that it's on top of the list of github actions +on: + workflow_dispatch: # Manual trigger so you don't release on every push + inputs: + ref_to_release: + description: "[Optional] Branch or commit to release. Default: 1.x" + required: false + type: string + # default has to be a static string, no variables allowed + default: "1.x" + +jobs: + call-release-job: + permissions: + contents: write # needed to push commit and tag back to the repository + uses: project-ncl/shared-github-actions/.github/workflows/maven-release.yml@646d9b629925d6405fb06ed1476aefd6b2cdca86 # v0.0.23 + with: + java_version: "11" + ref_to_release: ${{ inputs.ref_to_release }} + release_command: 'mvn -B -V release:prepare release:perform -DlocalCheckout=true -DpushChanges=false' + secrets: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_BOT_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_BOT_TOKEN }} + GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} + GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} diff --git a/.github/workflows/maven-set-version.yml b/.github/workflows/maven-set-version.yml new file mode 100644 index 0000000..c42dcfb --- /dev/null +++ b/.github/workflows/maven-set-version.yml @@ -0,0 +1,25 @@ +name: "0 Maven Set Version Job" # Adding the 0 so that it's on top of the list of github actions +on: + workflow_dispatch: # Manual trigger + inputs: + new_version: + description: "[Required] Version to set" + required: true + type: string + + ref_for_version: + description: "[Optional] Branch or commit to change version. Default: 1.x" + required: false + type: string + # default has to be a static string, no variables allowed + default: "1.x" + +jobs: + call-maven-set-version-job: + permissions: + contents: write # needed to push commit and tag back to the repository + uses: project-ncl/shared-github-actions/.github/workflows/maven-set-version.yml@646d9b629925d6405fb06ed1476aefd6b2cdca86 # v0.0.23 + with: + java_version: "11" + new_version: ${{ inputs.new_version }} + ref_for_version: ${{ inputs.ref_for_version }} diff --git a/.github/workflows/maven-snapshot.yml b/.github/workflows/maven-snapshot.yml new file mode 100644 index 0000000..f9850b1 --- /dev/null +++ b/.github/workflows/maven-snapshot.yml @@ -0,0 +1,18 @@ +name: Build snapshot version and upload to Maven Central + +on: + push: + branches: ["1.x"] + +permissions: {} + +jobs: + call-snapshot-job: + uses: project-ncl/shared-github-actions/.github/workflows/maven-snapshot.yml@646d9b629925d6405fb06ed1476aefd6b2cdca86 # v0.0.23 + with: + java_version: "11" + project_name: "Commonjava/weft" + snapshot_deploy_command: "mvn help:effective-settings -B -V clean deploy -e" + secrets: + SONATYPE_USERNAME: ${{ secrets.SONATYPE_BOT_USERNAME }} + SONATYPE_PASSWORD: ${{ secrets.SONATYPE_BOT_TOKEN }} diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml deleted file mode 100644 index ba806dd..0000000 --- a/.github/workflows/maven-verify.yml +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2013-2022 Red Hat, Inc. (https://github.com/Commonjava/weft) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: maven verify - -on: [pull_request] - -jobs: - build: - name: Build with maven - runs-on: ubuntu-latest - env: - MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m" - steps: - - uses: actions/checkout@v4 - - - name: Set up JDK 11 for x64 - uses: actions/setup-java@v3 - with: - java-version: '11' - distribution: 'temurin' - architecture: x64 - - - uses: s4u/maven-settings-action@v2.8.0 - with: - sonatypeSnapshots: true - - - name: Build the Maven verify phase - run: mvn -B -V clean verify -Prun-its -Pci diff --git a/.github/workflows/validate-gh-action.yml b/.github/workflows/validate-gh-action.yml new file mode 100644 index 0000000..ad77e19 --- /dev/null +++ b/.github/workflows/validate-gh-action.yml @@ -0,0 +1,12 @@ +name: Validate GitHub Actions Workflows +permissions: {} + +on: + pull_request: + branches: ["1.x"] + paths: + - ".github/workflows/*.yml" + +jobs: + validate: + uses: project-ncl/shared-github-actions/.github/workflows/validate-gh-action.yml@646d9b629925d6405fb06ed1476aefd6b2cdca86 # v0.0.23 diff --git a/pom.xml b/pom.xml index 828c5a6..17db3ff 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ org.commonjava commonjava - 21 + 23 org.commonjava.cdi.util @@ -53,7 +53,7 @@ org.commonjava.boms web-commons-bom - 34 + 35 pom import @@ -69,6 +69,7 @@ javax.inject javax.inject + 1 javax.enterprise @@ -114,4 +115,12 @@ + + + sonatype-snapshots + https://central.sonatype.com/repository/maven-snapshots/ + false + true + + From ef7899dcd9c650d0b41964a5370241eb6bd50a63 Mon Sep 17 00:00:00 2001 From: Patrik Korytar Date: Thu, 17 Sep 2026 12:22:59 +0200 Subject: [PATCH 2/2] Fix license header --- pom.xml | 4 ++-- .../cdi/util/weft/ContextSensitiveWeakHashMap.java | 6 +++--- .../cdi/util/weft/DrainingExecutorCompletionService.java | 6 +++--- .../java/org/commonjava/cdi/util/weft/ExecutorConfig.java | 6 +++--- .../java/org/commonjava/cdi/util/weft/ExecutorProvider.java | 6 +++--- src/main/java/org/commonjava/cdi/util/weft/Locker.java | 6 +++--- .../org/commonjava/cdi/util/weft/NamedThreadFactory.java | 6 +++--- .../commonjava/cdi/util/weft/PoolWeftExecutorService.java | 6 +++--- .../java/org/commonjava/cdi/util/weft/SignallingLock.java | 6 +++--- .../commonjava/cdi/util/weft/SignallingLockOperation.java | 6 +++--- .../java/org/commonjava/cdi/util/weft/SignallingLocker.java | 6 +++--- .../cdi/util/weft/SingleThreadedExecutorService.java | 6 +++--- .../org/commonjava/cdi/util/weft/StoppableRunnable.java | 6 +++--- .../java/org/commonjava/cdi/util/weft/ThreadContext.java | 6 +++--- .../org/commonjava/cdi/util/weft/ThreadContextualizer.java | 6 +++--- .../org/commonjava/cdi/util/weft/WeftExecutorService.java | 6 +++--- src/main/java/org/commonjava/cdi/util/weft/WeftManaged.java | 6 +++--- src/main/java/org/commonjava/cdi/util/weft/WeftPoolBoy.java | 6 +++--- .../org/commonjava/cdi/util/weft/WeftScheduledExecutor.java | 6 +++--- .../commonjava/cdi/util/weft/config/DefaultWeftConfig.java | 6 +++--- .../org/commonjava/cdi/util/weft/config/WeftConfig.java | 6 +++--- .../cdi/util/weft/exception/PoolOverloadException.java | 6 +++--- .../cdi/util/weft/ContextSensitiveWeakHashMapTest.java | 6 +++--- src/test/java/org/commonjava/cdi/util/weft/MDCTest.java | 6 +++--- .../org/commonjava/cdi/util/weft/SignallingLockerTest.java | 6 +++--- src/test/java/org/commonjava/cdi/util/weft/SomeConfig.java | 6 +++--- 26 files changed, 77 insertions(+), 77 deletions(-) diff --git a/pom.xml b/pom.xml index 17db3ff..db9ec95 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@