Skip to content

Commit 5ae9861

Browse files
authored
Merge pull request #61 from xdev-software/develop
Release
2 parents 918a22f + 6d3c249 commit 5ae9861

File tree

16 files changed

+620
-108
lines changed

16 files changed

+620
-108
lines changed

.config/checkstyle/checkstyle.xml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<module name="LineLength">
1717
<property name="max" value="120"/>
1818
<property name="fileExtensions" value="java"/>
19-
<!-- Ignore default + links in comments -->
19+
<!-- Ignore default + links -->
2020
<property name="ignorePattern" value="(^(package|import))|(^\s*(\/\/|\*) .*https?.*$)"/>
2121
</module>
2222
<module name="NewlineAtEndOfFile"/>
@@ -30,10 +30,6 @@
3030
</module>
3131

3232
<!-- Generated code -->
33-
<module name="SuppressionSingleFilter">
34-
<property name="checks" value="."/>
35-
<property name="files" value="[\\/](src)?gen[\\/].*\.java$"/>
36-
</module>
3733
<module name="SuppressionSingleFilter">
3834
<property name="checks" value="."/>
3935
<property name="files" value="[\\/]src[\\/]gen(erated)?[\\/].*\.java$"/>
@@ -43,7 +39,15 @@
4339
<property name="checks" value="MagicNumberCheck"/>
4440
<property name="files" value="[\\/]test[\\/].*\.java$"/>
4541
</module>
42+
43+
<!-- Suppressions -->
4644
<module name="SuppressWarningsFilter"/>
45+
<!-- https://github.com/checkstyle/checkstyle/issues/7287 -->
46+
<module name="SuppressWithPlainTextCommentFilter">
47+
<property name="offCommentFormat" value="// CHECKSTYLE\:OFF ([\w\|]+)"/>
48+
<property name="onCommentFormat" value="// CHECKSTYLE\:ON ([\w\|]+)"/>
49+
<property name="checkFormat" value="$1"/>
50+
</module>
4751

4852
<module name="TreeWalker">
4953
<!-- Checks - sorted alphabetically -->
@@ -131,11 +135,5 @@
131135
<property name="tokens"
132136
value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LCURLY,LE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,RCURLY,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
133137
</module>
134-
135-
<!-- Filter -->
136-
<module name="SuppressionCommentFilter">
137-
<property name="offCommentFormat" value="\s*CHECKSTYLE:OFF\s*[^\s]{1,}"/>
138-
<property name="onCommentFormat" value="\s*CHECKSTYLE:ON"/>
139-
</module>
140138
</module>
141139
</module>

.github/dependabot.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

.github/workflows/checkBuild.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
paths-ignore:
88
- '**.md'
99
- '.config/**'
10+
- '.github/**'
1011
- '.idea/**'
1112
- 'assets/**'
1213
pull_request:
1314
branches: [ develop ]
1415
paths-ignore:
1516
- '**.md'
1617
- '.config/**'
18+
- '.github/**'
1719
- '.idea/**'
1820
- 'assets/**'
1921

@@ -41,7 +43,7 @@ jobs:
4143
cache: 'maven'
4244

4345
- name: Build with Maven
44-
run: mvn -B clean package
46+
run: ./mvnw -B clean package
4547

4648
- name: Check for uncommited changes
4749
run: |
@@ -57,7 +59,7 @@ jobs:
5759
echo ----------------------------------------
5860
echo Troubleshooting
5961
echo ----------------------------------------
60-
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package"
62+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package"
6163
exit 1
6264
fi
6365
@@ -70,6 +72,7 @@ jobs:
7072

7173
code-style:
7274
runs-on: ubuntu-latest
75+
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
7376

7477
strategy:
7578
matrix:
@@ -87,4 +90,4 @@ jobs:
8790
cache: 'maven'
8891

8992
- name: Run Checkstyle
90-
run: mvn -B checkstyle:check -P checkstyle -T2C
93+
run: ./mvnw -B checkstyle:check -P checkstyle -T2C

.github/workflows/release.yml

Lines changed: 27 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66

77
env:
88
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
9-
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
109

1110
permissions:
1211
contents: write
@@ -26,7 +25,7 @@ jobs:
2625
cache: 'maven'
2726

2827
- name: Build with Maven
29-
run: mvn -B clean package
28+
run: ./mvnw -B clean package
3029

3130
- name: Check for uncommited changes
3231
run: |
@@ -42,7 +41,7 @@ jobs:
4241
echo ----------------------------------------
4342
echo Troubleshooting
4443
echo ----------------------------------------
45-
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && mvn -B clean package"
44+
echo "::error::Unstaged changes detected. Locally try running: git clean -ffdx && ./mvnw -B clean package"
4645
exit 1
4746
fi
4847
@@ -58,22 +57,22 @@ jobs:
5857
run: |
5958
git config --global user.email "actions@github.com"
6059
git config --global user.name "GitHub Actions"
61-
62-
- name: Un-SNAP root
63-
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
64-
65-
- name: Un-SNAP demo
66-
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
67-
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
6860
6961
- name: Un-SNAP
70-
run: mvn -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false
71-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
62+
run: |
63+
mvnwPath=$(readlink -f ./mvnw)
64+
modules=("") # root
65+
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
66+
for i in "${modules[@]}"
67+
do
68+
echo "Processing $i/pom.xml"
69+
(cd "$i" && $mvnwPath -B versions:set -DremoveSnapshot -DgenerateBackupPoms=false)
70+
done
7271
7372
- name: Get version
7473
id: version
7574
run: |
76-
version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
75+
version=$(../mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
7776
echo "release=$version" >> $GITHUB_OUTPUT
7877
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
7978
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
@@ -131,15 +130,14 @@ jobs:
131130
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
132131

133132
- name: Publish to Apache Maven Central
134-
run: mvn -B deploy -Possrh
133+
run: ../mvnw -B deploy -Possrh
135134
env:
136135
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}
137136
MAVEN_CENTRAL_TOKEN: ${{ secrets.S01_OSS_SONATYPE_MAVEN_TOKEN }}
138137
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
139138
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
140139

141140
publish-pages:
142-
name: Publish dependencies and licenses to github pages
143141
runs-on: ubuntu-latest
144142
needs: [prepare_release]
145143
steps:
@@ -158,40 +156,15 @@ jobs:
158156
distribution: 'temurin'
159157
cache: 'maven'
160158

161-
- name: Build dependencies/licenses files
162-
run: mvn -B project-info-reports:dependencies
159+
- name: Build site
160+
run: ../mvnw -B site
163161
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
164162

165-
- name: Upload licenses - Upload Artifact
166-
uses: actions/upload-artifact@v4
167-
with:
168-
name: dependencies-licenses
169-
path: ${{ env.PRIMARY_MAVEN_MODULE }}/target/site
170-
171-
- name: Generate docs/dependencies dir
172-
run: mkdir -p docs/dependencies
173-
174-
- name: Move built files into docs/dependencies
175-
run: mv ${{ env.PRIMARY_MAVEN_MODULE }}/target/site/* docs/dependencies
176-
177-
- name: Rename dependencies.html to index.html
178-
working-directory: docs/dependencies
179-
run: mv dependencies.html index.html
180-
181-
- name: Copy Readme into docs (as index.md)
182-
run: cp README.md docs/index.md
183-
184-
- name: Configure Pages
185-
working-directory: docs
186-
run: |-
187-
echo "theme: jekyll-theme-tactile" > _config.yml
188-
189163
- name: Deploy to Github pages
190-
uses: peaceiris/actions-gh-pages@v3
164+
uses: peaceiris/actions-gh-pages@v4
191165
with:
192166
github_token: ${{ secrets.GITHUB_TOKEN }}
193-
publish_dir: ./docs
194-
enable_jekyll: true
167+
publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
195168

196169
after_release:
197170
runs-on: ubuntu-latest
@@ -204,17 +177,17 @@ jobs:
204177
git config --global user.email "actions@github.com"
205178
git config --global user.name "GitHub Actions"
206179
git pull
207-
208-
- name: Inc Version and SNAP root
209-
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
210-
211-
- name: Inc Version and SNAP demo
212-
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
213-
working-directory: ${{ env.DEMO_MAVEN_MODULE }}
214-
180+
215181
- name: Inc Version and SNAP
216-
run: mvn -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true
217-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
182+
run: |
183+
mvnwPath=$(readlink -f ./mvnw)
184+
modules=("") # root
185+
modules+=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
186+
for i in "${modules[@]}"
187+
do
188+
echo "Processing $i/pom.xml"
189+
(cd "$i" && $mvnwPath -B build-helper:parse-version versions:set -DnewVersion=\${parsedVersion.majorVersion}.\${parsedVersion.minorVersion}.\${parsedVersion.nextIncrementalVersion} -DgenerateBackupPoms=false -DnextSnapshot=true)
190+
done
218191
219192
- name: Git Commit and Push
220193
run: |

.github/workflows/sonar.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@ on:
77
paths-ignore:
88
- '**.md'
99
- '.config/**'
10+
- '.github/**'
1011
- '.idea/**'
1112
- 'assets/**'
1213
pull_request:
1314
types: [opened, synchronize, reopened]
1415
paths-ignore:
1516
- '**.md'
1617
- '.config/**'
18+
- '.github/**'
1719
- '.idea/**'
1820
- 'assets/**'
1921

@@ -25,8 +27,7 @@ jobs:
2527
sonar:
2628
name: SonarCloud Scan
2729
runs-on: ubuntu-latest
28-
# Dependabot PRs have no access to secrets (SONAR_TOKEN) -> Ignore them
29-
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'dependabot/') }}
30+
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
3031
steps:
3132
- uses: actions/checkout@v4
3233
with:
@@ -53,7 +54,12 @@ jobs:
5354
restore-keys: ${{ runner.os }}-m2
5455

5556
- name: Build with Maven
56-
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} -Dsonar.organization=${{ env.SONARCLOUD_ORG }} -Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
57+
run: |
58+
./mvnw -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \
59+
-DskipTests \
60+
-Dsonar.projectKey=${{ env.SONARCLOUD_ORG }}_${{ github.event.repository.name }} \
61+
-Dsonar.organization=${{ env.SONARCLOUD_ORG }} \
62+
-Dsonar.host.url=${{ env.SONARCLOUD_HOST }}
5763
env:
5864
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
5965
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/test-deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
2525

2626
- name: Publish to OSSRH
27-
run: mvn -B deploy -Possrh
27+
run: ../mvnw -B deploy -Possrh
2828
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
2929
env:
3030
MAVEN_CENTRAL_USERNAME: ${{ secrets.S01_OSS_SONATYPE_MAVEN_USERNAME }}

.idea/checkstyle-idea.xml

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

.idea/codeStyles/Project.xml

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

.mvn/wrapper/maven-wrapper.properties

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ We also encourage you to read the [contribution instructions by GitHub](https://
2020
You should have the following things installed:
2121
* Git
2222
* Java 21 - should be as unmodified as possible (Recommended: [Eclipse Adoptium](https://adoptium.net/temurin/releases/))
23-
* Maven
23+
* Maven (Note that the [Maven Wrapper](https://maven.apache.org/wrapper/) is shipped with the repo)
2424

2525
### Recommended setup
2626
* Install ``IntelliJ`` (Community Edition is sufficient)

0 commit comments

Comments
 (0)