Skip to content

Commit 56990f6

Browse files
authored
Merge branch 'master' into scanfilter
2 parents 82ef68f + afd3335 commit 56990f6

Some content is hidden

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

43 files changed

+672
-398
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,25 @@
1-
#
2-
# Copyright 2010-2022 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:
20-
push:
21-
pull_request:
3+
on: [workflow_dispatch, push, pull_request]
224

235
jobs:
246
test:
257
runs-on: ${{ matrix.os }}
268
strategy:
279
matrix:
28-
os: [ubuntu-latest, macOS-latest, windows-latest]
29-
java: [17, 20, 21-ea]
30-
distribution: ['zulu']
10+
os: [ubuntu-latest, macos-latest, windows-latest]
11+
java: [17, 21, 22-ea]
12+
distribution: ['temurin']
3113
fail-fast: false
32-
max-parallel: 5
14+
max-parallel: 4
3315
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
3416

3517
steps:
36-
- uses: actions/checkout@v3
37-
- name: Set up JDK
38-
uses: actions/setup-java@v3
18+
- uses: actions/checkout@v4
19+
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
20+
uses: actions/setup-java@v4
3921
with:
4022
java-version: ${{ matrix.java }}
4123
distribution: ${{ matrix.distribution }}
4224
- name: Test with Maven
43-
run: ./mvnw test -B -D"license.skip=true"
25+
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true"

.github/workflows/codeql.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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: '37 14 * * 6'
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+
# Initializes the CodeQL tools for scanning.
54+
- name: Initialize CodeQL
55+
uses: github/codeql-action/init@v3
56+
with:
57+
languages: ${{ matrix.language }}
58+
# If you wish to specify custom queries, you can do so here or in a config file.
59+
# By default, queries listed here will override any specified in a config file.
60+
# Prefix the list here with "+" to use these queries and those in the config file.
61+
62+
# 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
63+
# queries: security-extended,security-and-quality
64+
65+
66+
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
67+
# If this step fails, then you should remove it and run the build manually (see below)
68+
- name: Autobuild
69+
uses: github/codeql-action/autobuild@v3
70+
71+
# ℹ️ Command-line programs to run using the OS shell.
72+
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
73+
74+
# If the Autobuild fails above, remove it and uncomment the following three lines.
75+
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
76+
77+
# - run: |
78+
# echo "Run, Build Application using script"
79+
# ./location_of_script_within_repo/buildscript.sh
80+
81+
- name: Perform CodeQL Analysis
82+
uses: github/codeql-action/analyze@v3
83+
with:
84+
category: "/language:${{matrix.language}}"

.github/workflows/coveralls.yaml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
1-
#
2-
# Copyright 2010-2022 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

19-
on:
20-
push:
21-
pull_request:
3+
on: [push, pull_request]
224

235
jobs:
246
build:
257
if: github.repository_owner == 'mybatis'
268
runs-on: ubuntu-latest
279
steps:
28-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
2911
- name: Set up JDK
30-
uses: actions/setup-java@v3
12+
uses: actions/setup-java@v4
3113
with:
32-
java-version: 17
14+
java-version: 21
3315
distribution: zulu
3416
- name: Report Coverage to Coveralls for Pull Requests
3517
if: github.event_name == 'pull_request'
36-
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
18+
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
3719
env:
3820
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3921
PR_NUMBER: ${{ github.event.number }}
4022
- name: Report Coverage to Coveralls for General Push
4123
if: github.event_name == 'push'
42-
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github
24+
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
4325
env:
4426
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/site.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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+
java-version: 21
18+
distribution: zulu
19+
- uses: webfactory/ssh-agent@master
20+
with:
21+
ssh-private-key: ${{ secrets.DEPLOY_KEY }}
22+
- name: Build site
23+
run: ./mvnw site site:stage -DskipTests -B -V --no-transfer-progress -Dlicense.skip=true
24+
env:
25+
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
- name: Deploy Site to gh-pages
28+
uses: JamesIves/[email protected]
29+
with:
30+
ssh-key: true
31+
branch: gh-pages
32+
folder: target/staging
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/sonar.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
#
2-
# Copyright 2010-2022 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,17 @@ 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
20+
java-version: 21
3721
distribution: zulu
3822
- name: Analyze with SonarCloud
39-
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_spring -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
23+
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_spring -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
4024
env:
4125
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4226
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,3 @@
1-
#
2-
# Copyright 2010-2022 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,14 @@ 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
17+
java-version: 21
3418
distribution: zulu
3519
- name: Deploy to Sonatype
36-
run: ./mvnw deploy -DskipTests -B --settings ./.mvn/settings.xml -Dlicense.skip=true
20+
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
3721
env:
3822
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
3923
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@
99
.mvn/wrapper/maven-wrapper.jar
1010
release.properties
1111
*.releaseBackup
12+
.github/keys/

.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 2010-2023 the original author or authors.
4+
Copyright 2010-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 2010-2023 the original author or authors.
4+
Copyright 2010-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)