Skip to content

Commit 3ec3ca3

Browse files
committed
Merge branch 'develop' into update-from-template-github_com_xdev-software_standard-maven-template_master-merged
2 parents ba570b9 + 2dd9327 commit 3ec3ca3

File tree

375 files changed

+24364
-170
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

375 files changed

+24364
-170
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ body:
1515
attributes:
1616
label: "Checklist"
1717
options:
18-
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/template-placeholder/releases/latest)"
18+
- label: "I am able to reproduce the bug with the [latest version](https://github.com/xdev-software/spring-security-extras/releases/latest)"
1919
required: true
20-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
20+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/spring-security-extras/issues) or [closed](https://github.com/xdev-software/spring-security-extras/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
2121
required: true
2222
- label: "I have taken the time to fill in all the required details. I understand that the bug report will be dismissed otherwise."
2323
required: true

.github/ISSUE_TEMPLATE/enhancement.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ body:
1313
attributes:
1414
label: "Checklist"
1515
options:
16-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
16+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/spring-security-extras/issues) or [closed](https://github.com/xdev-software/spring-security-extras/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1717
required: true
1818
- label: "I have taken the time to fill in all the required details. I understand that the feature request will be dismissed otherwise."
1919
required: true

.github/ISSUE_TEMPLATE/question.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ body:
1212
attributes:
1313
label: "Checklist"
1414
options:
15-
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/template-placeholder/issues) or [closed](https://github.com/xdev-software/template-placeholder/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
15+
- label: "I made sure that there are *no existing issues* - [open](https://github.com/xdev-software/spring-security-extras/issues) or [closed](https://github.com/xdev-software/spring-security-extras/issues?q=is%3Aissue+is%3Aclosed) - which I could contribute my information to."
1616
required: true
1717
- label: "I have taken the time to fill in all the required details. I understand that the question will be dismissed otherwise."
1818
required: true

.github/workflows/check-build.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@ on:
1919
- '.idea/**'
2020
- 'assets/**'
2121

22-
env:
23-
DEMO_MAVEN_MODULE: ${{ github.event.repository.name }}-demo
24-
2522
jobs:
2623
build:
2724
runs-on: ubuntu-latest
2825
timeout-minutes: 30
2926
strategy:
3027
matrix:
31-
java: [17, 21, 25]
28+
java: [21, 25]
3229
distribution: [temurin]
3330
steps:
3431
- uses: actions/checkout@v6
@@ -68,13 +65,6 @@ jobs:
6865
exit 1
6966
fi
7067
71-
- name: Upload demo files
72-
uses: actions/upload-artifact@v7
73-
with:
74-
name: demo-files-java-${{ matrix.java }}
75-
path: ${{ env.DEMO_MAVEN_MODULE }}/target/${{ env.DEMO_MAVEN_MODULE }}.jar
76-
if-no-files-found: error
77-
7868
checkstyle:
7969
runs-on: ubuntu-latest
8070
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
@@ -117,7 +107,7 @@ jobs:
117107
timeout-minutes: 15
118108
strategy:
119109
matrix:
120-
java: [17]
110+
java: [21]
121111
distribution: [temurin]
122112
steps:
123113
- uses: actions/checkout@v6

.github/workflows/release.yml

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@ on:
44
push:
55
branches: [ master ]
66

7-
env:
8-
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
9-
107
permissions:
118
contents: write
129
pull-requests: write
@@ -23,7 +20,7 @@ jobs:
2320
- name: Set up JDK
2421
uses: actions/setup-java@v5
2522
with:
26-
java-version: '17'
23+
java-version: '21'
2724
distribution: 'temurin'
2825

2926
# Try to reuse existing cache from check-build
@@ -76,10 +73,9 @@ jobs:
7673
- name: Get version
7774
id: version
7875
run: |
79-
version=$(../mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
76+
version=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
8077
echo "release=$version" >> $GITHUB_OUTPUT
8178
echo "releasenumber=${version//[!0-9]/}" >> $GITHUB_OUTPUT
82-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
8379
8480
- name: Commit and Push
8581
run: |
@@ -104,12 +100,14 @@ jobs:
104100
Add the following lines to your pom:
105101
```XML
106102
<dependency>
107-
<groupId>software.xdev</groupId>
108-
<artifactId>${{ env.PRIMARY_MAVEN_MODULE }}</artifactId>
103+
<groupId>software.xdev.sse</groupId>
104+
<artifactId>corresponding_module</artifactId>
109105
<version>${{ steps.version.outputs.release }}</version>
110106
</dependency>
111107
```
112108
109+
You can also use the [BOM](https://github.com/${{ github.repository }}/tree/develop/bom) for easier dependency management.
110+
113111
publish-maven:
114112
runs-on: ubuntu-latest
115113
needs: [prepare-release]
@@ -127,15 +125,20 @@ jobs:
127125
uses: actions/setup-java@v5
128126
with: # running setup-java overwrites the settings.xml
129127
distribution: 'temurin'
130-
java-version: '17'
128+
java-version: '21'
131129
server-id: github-central
132130
server-password: PACKAGES_CENTRAL_TOKEN
133131
gpg-passphrase: MAVEN_GPG_PASSPHRASE
134132
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
135133

136134
- name: Publish to GitHub Packages Central
137-
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
138-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
135+
run: |
136+
modules=("bom")
137+
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
138+
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
139+
printf -v modules_joined '%s,' "${modules[@]}"
140+
modules_arg=$(echo "${modules_joined%,}")
141+
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
139142
env:
140143
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
141144
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
@@ -144,19 +147,24 @@ jobs:
144147
uses: actions/setup-java@v5
145148
with: # running setup-java again overwrites the settings.xml
146149
distribution: 'temurin'
147-
java-version: '17'
150+
java-version: '21'
148151
server-id: sonatype-central-portal
149152
server-username: MAVEN_CENTRAL_USERNAME
150153
server-password: MAVEN_CENTRAL_TOKEN
151154
gpg-passphrase: MAVEN_GPG_PASSPHRASE
152155

153156
- name: Publish to Central Portal
154-
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
157+
run: |
158+
modules=("bom")
159+
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
160+
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
161+
printf -v modules_joined '%s,' "${modules[@]}"
162+
modules_arg=$(echo "${modules_joined%,}")
163+
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish,publish-sonatype-central-portal -DskipTests
155164
env:
156165
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
157166
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}
158167
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
159-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
160168

161169
publish-pages:
162170
runs-on: ubuntu-latest
@@ -174,7 +182,7 @@ jobs:
174182
- name: Setup - Java
175183
uses: actions/setup-java@v5
176184
with:
177-
java-version: '17'
185+
java-version: '21'
178186
distribution: 'temurin'
179187

180188
# Try to reuse existing cache from check-build
@@ -187,14 +195,23 @@ jobs:
187195
${{ runner.os }}-mvn-build-
188196
189197
- name: Build site
190-
run: ../mvnw -B compile site -DskipTests -T2C
191-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
198+
run: ./mvnw -B compile site -DskipTests -T2C
199+
200+
- name: Aggregate site
201+
run: |
202+
modules=($(grep -ozP '(?<=module>)[^<]+' 'pom.xml' | tr -d '\0'))
203+
for m in "${modules[@]}"
204+
do
205+
echo "$m/target/site -> ./target/$m"
206+
mkdir -p ./target/$m
207+
cp -r $m/target/site ./target/$m
208+
done
192209
193210
- name: Deploy to Github pages
194211
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4
195212
with:
196213
github_token: ${{ secrets.GITHUB_TOKEN }}
197-
publish_dir: ./${{ env.PRIMARY_MAVEN_MODULE }}/target/site
214+
publish_dir: ./target/site
198215
force_orphan: true
199216

200217
after-release:
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Run integration tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [ develop ]
7+
paths-ignore:
8+
- '**.md'
9+
- '.config/**'
10+
- '.github/**'
11+
- '.idea/**'
12+
- 'assets/**'
13+
pull_request:
14+
branches: [ develop ]
15+
paths-ignore:
16+
- '**.md'
17+
- '.config/**'
18+
- '.github/**'
19+
- '.idea/**'
20+
- 'assets/**'
21+
22+
concurrency:
23+
group: ${{ github.workflow }}-${{ github.ref }}
24+
cancel-in-progress: true
25+
26+
jobs:
27+
run-integration-tests:
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
java: [25]
32+
project: [webapp-rest-it, webapp-vaadin-it]
33+
parallel: [2]
34+
pre-start: [true]
35+
runs-on: ubuntu-latest
36+
if: ${{ !(github.event_name == 'pull_request' && startsWith(github.head_ref, 'renovate/')) }}
37+
steps:
38+
- uses: actions/checkout@v6
39+
40+
- name: Set up JDK
41+
uses: actions/setup-java@v5
42+
with:
43+
distribution: temurin
44+
java-version: ${{ matrix.java }}
45+
46+
- name: Cache Maven
47+
uses: actions/cache@v5
48+
with:
49+
path: ~/.m2/repository
50+
key: ${{ runner.os }}-mvn-it-build-${{ hashFiles('**/pom.xml') }}
51+
restore-keys: |
52+
${{ runner.os }}-mvn-it-build-
53+
${{ runner.os }}-mvn-build-
54+
55+
- name: Test
56+
run: |
57+
./mvnw -B test \
58+
-pl "demo/integration-tests/${{ matrix.project }}" -am \
59+
-P run-it \
60+
${{ matrix.pre-start && '-Dinfra-pre-start.enabled=1 ' || '' }} \
61+
${{ matrix.parallel > 0 && format('-Djunit.jupiter.execution.parallel.enabled=true -Djunit.jupiter.execution.parallel.mode.default=concurrent -Djunit.jupiter.execution.parallel.mode.classes.default=concurrent -Djunit.jupiter.execution.parallel.config.strategy=fixed -Djunit.jupiter.execution.parallel.config.fixed.parallelism=2 -Djunit.jupiter.execution.parallel.config.fixed.max-pool-size={0} ', matrix.parallel) || '' }}
62+
63+
# Replace '/' with '-'
64+
- name: Normalize project name
65+
if: failure()
66+
env:
67+
PROJECT: ${{ matrix.project }}
68+
run: echo PROJECT_NORMALIZED=${PROJECT/\//-} >> $GITHUB_ENV
69+
70+
- name: Upload videos of test failures
71+
if: failure()
72+
uses: actions/upload-artifact@v7
73+
with:
74+
name: test-fail-videos-${{ matrix.java }}-${{ env.PROJECT_NORMALIZED }}-${{ matrix.parallel }}-${{ matrix.pre-start }}
75+
path: demo/integration-tests/${{ matrix.project }}/target/records
76+
if-no-files-found: ignore

.github/workflows/test-deploy.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Test Deployment
33
on:
44
workflow_dispatch:
55

6-
env:
7-
PRIMARY_MAVEN_MODULE: ${{ github.event.repository.name }}
8-
96
jobs:
107
publish-maven:
118
runs-on: ubuntu-latest
@@ -17,15 +14,20 @@ jobs:
1714
uses: actions/setup-java@v5
1815
with: # running setup-java overwrites the settings.xml
1916
distribution: 'temurin'
20-
java-version: '17'
17+
java-version: '21'
2118
server-id: github-central
2219
server-password: PACKAGES_CENTRAL_TOKEN
2320
gpg-passphrase: MAVEN_GPG_PASSPHRASE
2421
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Only import once
2522

2623
- name: Publish to GitHub Packages Central
27-
run: ../mvnw -B deploy -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
28-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
24+
run: |
25+
modules=("bom")
26+
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
27+
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
28+
printf -v modules_joined '%s,' "${modules[@]}"
29+
modules_arg=$(echo "${modules_joined%,}")
30+
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish -DskipTests -DaltDeploymentRepository=github-central::https://maven.pkg.github.com/xdev-software/central
2931
env:
3032
PACKAGES_CENTRAL_TOKEN: ${{ secrets.PACKAGES_CENTRAL_TOKEN }}
3133
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
@@ -34,15 +36,20 @@ jobs:
3436
uses: actions/setup-java@v5
3537
with: # running setup-java again overwrites the settings.xml
3638
distribution: 'temurin'
37-
java-version: '17'
39+
java-version: '21'
3840
server-id: sonatype-central-portal
3941
server-username: MAVEN_CENTRAL_USERNAME
4042
server-password: MAVEN_CENTRAL_TOKEN
4143
gpg-passphrase: MAVEN_GPG_PASSPHRASE
4244

4345
- name: Publish to Central Portal
44-
run: ../mvnw -B deploy -P publish,publish-sonatype-central-portal -DskipTests
45-
working-directory: ${{ env.PRIMARY_MAVEN_MODULE }}
46+
run: |
47+
modules=("bom")
48+
dependency_management_block=$(grep -ozP '<dependencyManagement>(\r|\n|.)*<\/dependencyManagement>' 'bom/pom.xml' | tr -d '\0')
49+
modules+=($(echo $dependency_management_block | grep -oP '(?<=<artifactId>)[^<]+'))
50+
printf -v modules_joined '%s,' "${modules[@]}"
51+
modules_arg=$(echo "${modules_joined%,}")
52+
./mvnw -B deploy -pl "$modules_arg" -am -T2C -P publish,publish-sonatype-central-portal -DskipTests
4653
env:
4754
MAVEN_CENTRAL_USERNAME: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_USERNAME }}
4855
MAVEN_CENTRAL_TOKEN: ${{ secrets.SONATYPE_MAVEN_CENTRAL_PORTAL_TOKEN }}

.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,29 @@ hs_err_pid*
3333
.classpath
3434
.project
3535

36+
#vaadin/node webpack/frontend stuff
37+
# Ignore Node
38+
node/
39+
40+
# The following files are generated/updated by vaadin-maven-plugin
41+
node_modules/
42+
43+
# Vaadin
44+
package.json
45+
package-lock.json
46+
webpack.generated.js
47+
webpack.config.js
48+
tsconfig.json
49+
types.d.ts
50+
vite.config.ts
51+
vite.generated.ts
52+
/**/src/main/frontend/generated/
53+
/**/src/main/frontend/index.html
54+
/**/src/main/dev-bundle/
55+
/**/src/main/bundles/
56+
*.lock
57+
58+
3659
# == IntelliJ ==
3760
*.iml
3861
*.ipr
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="REST - All tests (p=2 + PreStart)" type="JUnit" factoryName="JUnit">
3+
<module name="webapp-rest-it" />
4+
<option name="PACKAGE_NAME" value="" />
5+
<option name="MAIN_CLASS_NAME" value="" />
6+
<option name="METHOD_NAME" value="" />
7+
<option name="TEST_OBJECT" value="package" />
8+
<option name="VM_PARAMETERS" value="-ea -Dinfra-pre-start.enabled=1 -Djunit.jupiter.execution.parallel.enabled=true -Djunit.jupiter.execution.parallel.mode.default=concurrent -Djunit.jupiter.execution.parallel.mode.classes.default=concurrent -Djunit.jupiter.execution.parallel.config.strategy=fixed -Djunit.jupiter.execution.parallel.config.fixed.parallelism=2 -Djunit.jupiter.execution.parallel.config.fixed.max-pool-size=2" />
9+
<method v="2">
10+
<option name="Make" enabled="true" />
11+
</method>
12+
</configuration>
13+
</component>

0 commit comments

Comments
 (0)