Skip to content

Commit 38a758c

Browse files
authored
Merge pull request #190 from xdev-software/develop
Release
2 parents 3ea6226 + 9029dd8 commit 38a758c

File tree

30 files changed

+1382
-131
lines changed

30 files changed

+1382
-131
lines changed

.config/pmd/java/ruleset.xml

Lines changed: 877 additions & 3 deletions
Large diffs are not rendered by default.

.github/workflows/broken-links.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919

2020
- name: Link Checker
2121
id: lychee
22-
uses: lycheeverse/lychee-action@5c4ee84814c983aa7164eaee476f014e53ff3963 # v2
22+
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2
2323
with:
2424
fail: false # Don't fail on broken links, create an issue instead
2525

2626
- name: Find already existing issue
2727
id: find-issue
2828
run: |
29-
echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title \"Link Checker Report\"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT
29+
echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title "Link Checker Report"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT
3030
env:
3131
GH_TOKEN: ${{ github.token }}
32-
32+
3333
- name: Close issue if everything is fine
3434
if: steps.lychee.outputs.exit_code == 0 && steps.find-issue.outputs.number != ''
3535
run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }}
@@ -38,7 +38,7 @@ jobs:
3838

3939
- name: Create Issue From File
4040
if: steps.lychee.outputs.exit_code != 0
41-
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5
41+
uses: peter-evans/create-issue-from-file@fca9117c27cdc29c6c4db3b86c48e4115a786710 # v6
4242
with:
4343
issue-number: ${{ steps.find-issue.outputs.number }}
4444
title: Link Checker Report

.github/workflows/check-build.yml

Lines changed: 50 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -25,27 +25,32 @@ env:
2525
jobs:
2626
build:
2727
timeout-minutes: 30
28-
2928
strategy:
3029
matrix:
31-
java: [17, 21]
30+
java: [21, 25]
3231
distribution: [temurin]
3332
os: [ubuntu-latest, windows-latest] # Windows is needed for recursive NTFS junctions
34-
3533
runs-on: ${{ matrix.os }}
3634
steps:
3735
- uses: actions/checkout@v5
38-
36+
3937
- name: Set up JDK
40-
uses: actions/setup-java@v4
38+
uses: actions/setup-java@v5
4139
with:
4240
distribution: ${{ matrix.distribution }}
4341
java-version: ${{ matrix.java }}
44-
cache: 'maven'
45-
42+
43+
- name: Cache Maven
44+
uses: actions/cache@v4
45+
with:
46+
path: ~/.m2/repository
47+
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
48+
restore-keys: |
49+
${{ runner.os }}-mvn-build-
50+
4651
- name: Build with Maven
4752
run: ./mvnw -B clean package -P run-integration-tests -T2C
48-
53+
4954
- name: Check for uncommited changes
5055
shell: bash
5156
run: |
@@ -69,21 +74,34 @@ jobs:
6974
runs-on: ubuntu-latest
7075
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
7176
timeout-minutes: 15
72-
7377
strategy:
7478
matrix:
75-
java: [17]
79+
java: [21]
7680
distribution: [temurin]
77-
7881
steps:
7982
- uses: actions/checkout@v5
80-
83+
8184
- name: Set up JDK
82-
uses: actions/setup-java@v4
85+
uses: actions/setup-java@v5
8386
with:
8487
distribution: ${{ matrix.distribution }}
8588
java-version: ${{ matrix.java }}
86-
cache: 'maven'
89+
90+
- name: Cache Maven
91+
uses: actions/cache@v4
92+
with:
93+
path: ~/.m2/repository
94+
key: ${{ runner.os }}-mvn-checkstyle-${{ hashFiles('**/pom.xml') }}
95+
restore-keys: |
96+
${{ runner.os }}-mvn-checkstyle-
97+
98+
- name: CheckStyle Cache
99+
uses: actions/cache@v4
100+
with:
101+
path: '**/target/checkstyle-cachefile'
102+
key: ${{ runner.os }}-checkstyle-${{ hashFiles('**/pom.xml') }}
103+
restore-keys: |
104+
${{ runner.os }}-checkstyle-
87105
88106
- name: Run Checkstyle
89107
run: ./mvnw -B checkstyle:check -P checkstyle -T2C
@@ -92,21 +110,34 @@ jobs:
92110
runs-on: ubuntu-latest
93111
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
94112
timeout-minutes: 15
95-
96113
strategy:
97114
matrix:
98-
java: [17]
115+
java: [21]
99116
distribution: [temurin]
100-
101117
steps:
102118
- uses: actions/checkout@v5
103119

104120
- name: Set up JDK
105-
uses: actions/setup-java@v4
121+
uses: actions/setup-java@v5
106122
with:
107123
distribution: ${{ matrix.distribution }}
108124
java-version: ${{ matrix.java }}
109-
cache: 'maven'
125+
126+
- name: Cache Maven
127+
uses: actions/cache@v4
128+
with:
129+
path: ~/.m2/repository
130+
key: ${{ runner.os }}-mvn-pmd-${{ hashFiles('**/pom.xml') }}
131+
restore-keys: |
132+
${{ runner.os }}-mvn-pmd-
133+
134+
- name: PMD Cache
135+
uses: actions/cache@v4
136+
with:
137+
path: '**/target/pmd/pmd.cache'
138+
key: ${{ runner.os }}-pmd-${{ hashFiles('**/pom.xml') }}
139+
restore-keys: |
140+
${{ runner.os }}-pmd-
110141
111142
- name: Run PMD
112143
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -DskipTests -T2C

.github/workflows/release.yml

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,30 @@ permissions:
1111
contents: write
1212
pull-requests: write
1313

14+
# DO NOT RESTORE CACHE for critical release steps to prevent a (extremely unlikely) scenario
15+
# where a supply chain attack could be achieved due to poisoned cache
1416
jobs:
1517
check-code:
1618
runs-on: ubuntu-latest
1719
timeout-minutes: 30
1820
steps:
1921
- uses: actions/checkout@v5
20-
22+
2123
- name: Set up JDK
22-
uses: actions/setup-java@v4
24+
uses: actions/setup-java@v5
2325
with:
24-
java-version: '17'
26+
java-version: '21'
2527
distribution: 'temurin'
26-
cache: 'maven'
27-
28+
29+
# Try to reuse existing cache from check-build
30+
- name: Try restore Maven Cache
31+
uses: actions/cache/restore@v4
32+
with:
33+
path: ~/.m2/repository
34+
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
35+
restore-keys: |
36+
${{ runner.os }}-mvn-build-
37+
2838
- name: Build with Maven
2939
run: ./mvnw -B clean package -T2C
3040

@@ -54,34 +64,34 @@ jobs:
5464
upload_url: ${{ steps.create-release.outputs.upload_url }}
5565
steps:
5666
- uses: actions/checkout@v5
57-
67+
5868
- name: Configure Git
5969
run: |
6070
git config --global user.email "actions@github.com"
6171
git config --global user.name "GitHub Actions"
62-
72+
6373
- name: Un-SNAP
6474
run: ./mvnw -B versions:set -DremoveSnapshot -DprocessAllModules -DgenerateBackupPoms=false
65-
75+
6676
- name: Get version
6777
id: version
6878
run: |
6979
version=$(../mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
7080
echo "release=$version" >> $GITHUB_OUTPUT
7181
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
7282
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
73-
83+
7484
- name: Commit and Push
7585
run: |
7686
git add -A
7787
git commit -m "Release ${{ steps.version.outputs.release }}"
7888
git push origin
7989
git tag v${{ steps.version.outputs.release }}
8090
git push origin --tags
81-
91+
8292
- name: Create Release
8393
id: create-release
84-
uses: shogo82148/actions-create-release@4661dc54f7b4b564074e9fbf73884d960de569a3 # v1
94+
uses: shogo82148/actions-create-release@7b89596097b26731bda0852f1504f813499079ee # v1
8595
with:
8696
tag_name: v${{ steps.version.outputs.release }}
8797
release_name: v${{ steps.version.outputs.release }}
@@ -106,23 +116,23 @@ jobs:
106116
timeout-minutes: 60
107117
steps:
108118
- uses: actions/checkout@v5
109-
119+
110120
- name: Init Git and pull
111121
run: |
112122
git config --global user.email "actions@github.com"
113123
git config --global user.name "GitHub Actions"
114124
git pull
115125
116126
- name: Set up JDK
117-
uses: actions/setup-java@v4
127+
uses: actions/setup-java@v5
118128
with: # running setup-java overwrites the settings.xml
119129
distribution: 'temurin'
120-
java-version: '17'
130+
java-version: '21'
121131
server-id: github-central
122132
server-password: PACKAGES_CENTRAL_TOKEN
123133
gpg-passphrase: MAVEN_GPG_PASSPHRASE
124134
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
125-
135+
126136
- name: Publish to GitHub Packages Central
127137
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
128138
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
@@ -131,10 +141,10 @@ jobs:
131141
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
132142

133143
- name: Set up JDK
134-
uses: actions/setup-java@v4
144+
uses: actions/setup-java@v5
135145
with: # running setup-java again overwrites the settings.xml
136146
distribution: 'temurin'
137-
java-version: '17'
147+
java-version: '21'
138148
server-id: sonatype-central-portal
139149
server-username: MAVEN_CENTRAL_USERNAME
140150
server-password: MAVEN_CENTRAL_TOKEN
@@ -154,19 +164,27 @@ jobs:
154164
timeout-minutes: 15
155165
steps:
156166
- uses: actions/checkout@v5
157-
167+
158168
- name: Init Git and pull
159169
run: |
160170
git config --global user.email "actions@github.com"
161171
git config --global user.name "GitHub Actions"
162172
git pull
163173
164174
- name: Setup - Java
165-
uses: actions/setup-java@v4
175+
uses: actions/setup-java@v5
166176
with:
167-
java-version: '17'
177+
java-version: '21'
168178
distribution: 'temurin'
169-
cache: 'maven'
179+
180+
# Try to reuse existing cache from check-build
181+
- name: Try restore Maven Cache
182+
uses: actions/cache/restore@v4
183+
with:
184+
path: ~/.m2/repository
185+
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
186+
restore-keys: |
187+
${{ runner.os }}-mvn-build-
170188
171189
- name: Build site
172190
run: ../mvnw -B compile site -DskipTests -T2C
@@ -185,7 +203,7 @@ jobs:
185203
timeout-minutes: 10
186204
steps:
187205
- uses: actions/checkout@v5
188-
206+
189207
- name: Init Git and pull
190208
run: |
191209
git config --global user.email "actions@github.com"
@@ -200,7 +218,7 @@ jobs:
200218
git add -A
201219
git commit -m "Preparing for next development iteration"
202220
git push origin
203-
221+
204222
- name: pull-request
205223
env:
206224
GH_TOKEN: ${{ github.token }}

.github/workflows/test-deploy.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ jobs:
1414
- uses: actions/checkout@v5
1515

1616
- name: Set up JDK
17-
uses: actions/setup-java@v4
17+
uses: actions/setup-java@v5
1818
with: # running setup-java overwrites the settings.xml
1919
distribution: 'temurin'
20-
java-version: '17'
20+
java-version: '21'
2121
server-id: github-central
2222
server-password: PACKAGES_CENTRAL_TOKEN
2323
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2424
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
25-
25+
2626
- name: Publish to GitHub Packages Central
2727
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
2828
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
2929
env:
3030
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
3131
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
32-
32+
3333
- name: Set up JDK
34-
uses: actions/setup-java@v4
34+
uses: actions/setup-java@v5
3535
with: # running setup-java again overwrites the settings.xml
3636
distribution: 'temurin'
37-
java-version: '17'
37+
java-version: '21'
3838
server-id: sonatype-central-portal
3939
server-username: MAVEN_CENTRAL_USERNAME
4040
server-password: MAVEN_CENTRAL_TOKEN

.github/workflows/update-from-template.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ jobs:
4343
# If no PAT is used the following error occurs on a push:
4444
# refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission
4545
token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}
46-
46+
4747
- name: Init Git
4848
run: |
4949
git config --global user.email "111048771+xdev-gh-bot@users.noreply.github.com"
@@ -190,7 +190,7 @@ jobs:
190190
# If no PAT is used the following error occurs on a push:
191191
# refusing to allow a GitHub App to create or update workflow `.github/workflows/xxx.yml` without `workflows` permission
192192
token: ${{ secrets.UPDATE_FROM_TEMPLATE_PAT }}
193-
193+
194194
- name: Init Git
195195
run: |
196196
git config --global user.email "111048771+xdev-gh-bot@users.noreply.github.com"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ hs_err_pid*
4444
!.idea/saveactions_settings.xml
4545
!.idea/checkstyle-idea.xml
4646
!.idea/externalDependencies.xml
47+
!.idea/PMDPlugin.xml
4748

4849
!.idea/inspectionProfiles/
4950
.idea/inspectionProfiles/*

.idea/PMDPlugin.xml

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)