Skip to content

Commit f3b888a

Browse files
committed
Merge master into core-2760-compat
2 parents 21f5907 + 123bff1 commit f3b888a

File tree

20 files changed

+474
-384
lines changed

20 files changed

+474
-384
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,27 @@
1-
#
2-
# Copyright 2018-2021 the original author or authors.
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
#
16-
171
name: Java CI
182

19-
on: [push, pull_request]
3+
on: [workflow_dispatch, push, pull_request]
204

215
jobs:
226
test:
237
runs-on: ${{ matrix.os }}
248
strategy:
259
matrix:
26-
os: [ubuntu-latest, macOS-latest, windows-latest]
27-
java: [11, 17, 19, 20-ea]
28-
distribution: ['zulu']
10+
cache: [maven]
11+
distribution: [temurin]
12+
java: [17, 21, 22, 23-ea]
13+
os: [ubuntu-latest, macos-latest, windows-latest]
2914
fail-fast: false
3015
max-parallel: 4
3116
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
3217

3318
steps:
34-
- uses: actions/checkout@v3
35-
- name: Set up JDK
36-
uses: actions/setup-java@v3
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
21+
uses: actions/setup-java@v4
3722
with:
3823
java-version: ${{ matrix.java }}
3924
distribution: ${{ matrix.distribution }}
25+
cache: ${{ matrix.cache }}
4026
- name: Test with Maven
41-
run: ./mvnw test -B -D"license.skip=true" -D"log.level.thymeleaf.config=info"
27+
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" -D"log.level.thymeleaf.config=info"

.github/workflows/codeql.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ "master" ]
17+
pull_request:
18+
branches: [ "master" ]
19+
schedule:
20+
- cron: '41 6 * * 3'
21+
22+
jobs:
23+
analyze:
24+
name: Analyze
25+
# Runner size impacts CodeQL analysis time. To learn more, please see:
26+
# - https://gh.io/recommended-hardware-resources-for-running-codeql
27+
# - https://gh.io/supported-runners-and-hardware-resources
28+
# - https://gh.io/using-larger-runners
29+
# Consider using larger runners for possible analysis time improvements.
30+
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
31+
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
32+
permissions:
33+
# required for all workflows
34+
security-events: write
35+
36+
# only required for workflows in private repositories
37+
actions: read
38+
contents: read
39+
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
language: [ 'java-kotlin' ]
44+
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
45+
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both
46+
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
47+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
48+
49+
steps:
50+
- name: Checkout repository
51+
uses: actions/checkout@v4
52+
53+
- name: Setup Java
54+
uses: actions/setup-java@v4
55+
with:
56+
java-version: 21
57+
distribution: 'temurin'
58+
59+
# Initializes the CodeQL tools for scanning.
60+
- name: Initialize CodeQL
61+
uses: github/codeql-action/init@v3
62+
with:
63+
languages: ${{ matrix.language }}
64+
# If you wish to specify custom queries, you can do so here or in a config file.
65+
# By default, queries listed here will override any specified in a config file.
66+
# Prefix the list here with "+" to use these queries and those in the config file.
67+
68+
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
69+
# queries: security-extended,security-and-quality
70+
71+
72+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
73+
# If this step fails, then you should remove it and run the build manually (see below)
74+
- name: Autobuild
75+
uses: github/codeql-action/autobuild@v3
76+
77+
# ℹ️ Command-line programs to run using the OS shell.
78+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
79+
80+
# If the Autobuild fails above, remove it and uncomment the following three lines.
81+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
82+
83+
# - run: |
84+
# echo "Run, Build Application using script"
85+
# ./location_of_script_within_repo/buildscript.sh
86+
87+
- name: Perform CodeQL Analysis
88+
uses: github/codeql-action/analyze@v3
89+
with:
90+
category: "/language:${{matrix.language}}"

.github/workflows/coveralls.yaml

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
#
2-
# Copyright 2018-2020 the original author or authors.
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
#
16-
171
name: Coveralls
182

193
on: [push, pull_request]
@@ -23,20 +7,21 @@ jobs:
237
if: github.repository_owner == 'mybatis'
248
runs-on: ubuntu-latest
259
steps:
26-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
2711
- name: Set up JDK
28-
uses: actions/setup-java@v3
12+
uses: actions/setup-java@v4
2913
with:
30-
java-version: 11
31-
distribution: zulu
14+
cache: maven
15+
distribution: temurin
16+
java-version: 21
3217
- name: Report Coverage to Coveralls for Pull Requests
3318
if: github.event_name == 'pull_request'
34-
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
19+
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
3520
env:
3621
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3722
PR_NUMBER: ${{ github.event.number }}
3823
- name: Report Coverage to Coveralls for General Push
3924
if: github.event_name == 'push'
40-
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github
25+
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -Dlog.level.thymeleaf.config=info -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
4126
env:
4227
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/site.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Site
2+
3+
on:
4+
push:
5+
branches:
6+
- site
7+
8+
jobs:
9+
build:
10+
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Set up JDK
15+
uses: actions/setup-java@v4
16+
with:
17+
cache: maven
18+
distribution: temurin
19+
java-version: 21
20+
- name: Build site
21+
run: ./mvnw site site:stage -DskipTests -Dlicense.skip=true -B -V --no-transfer-progress --settings ./.mvn/settings.xml
22+
env:
23+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
NVD_API_KEY: ${{ secrets.NVD_API_KEY }}
26+
- name: Deploy Site to gh-pages
27+
uses: JamesIves/github-pages-deploy-action@v4
28+
with:
29+
branch: gh-pages
30+
folder: target/staging
31+
ssh-key: ${{ secrets.DEPLOY_KEY }}

.github/workflows/sonar.yaml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
#
2-
# Copyright 2018-2020 the original author or authors.
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
#
16-
171
name: SonarCloud
182

193
on:
@@ -26,17 +10,18 @@ jobs:
2610
if: github.repository_owner == 'mybatis'
2711
runs-on: ubuntu-latest
2812
steps:
29-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
3014
with:
3115
# Disabling shallow clone is recommended for improving relevancy of reporting
3216
fetch-depth: 0
3317
- name: Set up JDK
34-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
3519
with:
36-
java-version: 17
37-
distribution: zulu
20+
cache: maven
21+
distribution: temurin
22+
java-version: 21
3823
- name: Analyze with SonarCloud
39-
run: ./mvnw verify jacoco:report sonar:sonar -B -Dlog.level.thymeleaf.config=info -Dsonar.projectKey=mybatis_thymeleaf-scripting -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
24+
run: ./mvnw verify jacoco:report sonar:sonar -B -V -Dlog.level.thymeleaf.config=info -Dsonar.projectKey=mybatis_thymeleaf-scripting -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
4025
env:
4126
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4227
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
#
2-
# Copyright 2018-2020 the original author or authors.
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# http://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
#
16-
171
name: Sonatype
182

193
on:
@@ -26,14 +10,15 @@ jobs:
2610
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
2711
runs-on: ubuntu-latest
2812
steps:
29-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
3014
- name: Set up JDK
31-
uses: actions/setup-java@v3
15+
uses: actions/setup-java@v4
3216
with:
33-
java-version: 17
34-
distribution: zulu
17+
cache: maven
18+
distribution: temurin
19+
java-version: 21
3520
- name: Deploy to Sonatype
36-
run: ./mvnw deploy -DskipTests -B -Dlog.level.thymeleaf.config=info --settings ./.mvn/settings.xml -Dlicense.skip=true
21+
run: ./mvnw deploy -DskipTests -B -V -Dlog.level.thymeleaf.config=info --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
3722
env:
3823
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
3924
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@
99
/nb*
1010
/release.properties
1111
/target
12+
.github/keys/
1213

1314
# These are needed if running in IDE without properties set
1415
/ibderby
1516
derby.log
1617
/bin/
1718
.mvn/wrapper/maven-wrapper.jar
19+
pom.xml.releaseBackup

.mvn/extensions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2018-2022 the original author or authors.
4+
Copyright 2018-2024 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.

.mvn/maven.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
-Daether.checksums.algorithms=SHA-512,SHA-256,SHA-1,MD5
2+
-Daether.connector.smartChecksums=false

.mvn/settings.xml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<!--
33
4-
Copyright 2018-2022 the original author or authors.
4+
Copyright 2018-2024 the original author or authors.
55
66
Licensed under the Apache License, Version 2.0 (the "License");
77
you may not use this file except in compliance with the License.
@@ -18,19 +18,36 @@
1818
-->
1919
<settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2020
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 https://maven.apache.org/xsd/settings-1.2.0.xsd">
21+
2122
<servers>
23+
<!-- Used for sonatype snapshots and releases -->
2224
<server>
2325
<id>ossrh</id>
2426
<username>${env.CI_DEPLOY_USERNAME}</username>
2527
<password>${env.CI_DEPLOY_PASSWORD}</password>
2628
</server>
29+
30+
<!-- Used for gh-pages-scm publish via maven-scm-publish-plugin -->
2731
<server>
28-
<id>gh-pages</id>
32+
<id>gh-pages-scm</id>
33+
<configuration>
34+
<scmVersionType>branch</scmVersionType>
35+
<scmVersion>gh-pages</scmVersion>
36+
</configuration>
2937
</server>
38+
39+
<!-- Github deployments (site) -->
3040
<server>
3141
<id>github</id>
3242
<username>${env.CI_DEPLOY_USERNAME}</username>
3343
<password>${env.GITHUB_TOKEN}</password>
3444
</server>
45+
46+
<!-- NVD API Access (dependency-check-plugin) -->
47+
<server>
48+
<id>nvd</id>
49+
<password>${env.NVD_API_KEY}</password>
50+
</server>
3551
</servers>
52+
3653
</settings>

0 commit comments

Comments
 (0)