Skip to content

Commit 2a95406

Browse files
committed
Merge branch 'master' into bind-in-foreach
# Conflicts: # src/main/java/org/apache/ibatis/builder/SqlSourceBuilder.java # src/main/java/org/apache/ibatis/scripting/defaults/DefaultParameterHandler.java # src/main/java/org/apache/ibatis/scripting/xmltags/DynamicContext.java # src/main/java/org/apache/ibatis/scripting/xmltags/ForEachSqlNode.java # src/main/java/org/apache/ibatis/scripting/xmltags/TextSqlNode.java # src/test/java/org/apache/ibatis/builder/SqlSourceBuilderTest.java
2 parents e7f7622 + d21e71b commit 2a95406

File tree

1,001 files changed

+24097
-20379
lines changed

Some content is hidden

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

1,001 files changed

+24097
-20379
lines changed

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# Set default behaviour, in case users don't have core.autocrlf set.
2-
* text=auto
2+
* text=auto

.github/workflows/ci.yaml

Lines changed: 13 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,30 @@
11
name: Java CI
22

3-
on: [push, pull_request]
3+
on: [workflow_dispatch, push, pull_request]
44

55
jobs:
66
test:
77
runs-on: ${{ matrix.os }}
88
strategy:
99
matrix:
10-
os: [ubuntu-latest, macOS-latest, windows-latest]
11-
java: [11, 17, 18, 19, 20]
12-
distribution: ['zulu']
10+
cache: [maven]
11+
distribution: [temurin]
12+
java: [17, 21, 23, 24-ea, 25-ea]
13+
os: [ubuntu-latest, macos-latest, windows-latest]
1314
fail-fast: false
1415
max-parallel: 4
1516
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
1617

1718
steps:
18-
- uses: actions/checkout@v3
19-
- name: Set JDK from jdk.java.net
20-
uses: oracle-actions/setup-java@v1
19+
- uses: actions/checkout@v4
20+
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
21+
uses: actions/setup-java@v4
2122
with:
22-
website: jdk.java.net
23-
release: ${{ matrix.java }}
24-
if: ${{ matrix.java != '11' && matrix.java != '17' }}
25-
- name: Set up older JDK
26-
uses: actions/setup-java@v3
27-
with:
28-
java-version: ${{ matrix.java }}
23+
cache: ${{ matrix.cache }}
2924
distribution: ${{ matrix.distribution }}
30-
if: ${{ matrix.java == '11' || matrix.java == '17' }}
31-
- name: Print JDK Version
32-
run: java -version
33-
- name: Cache local Maven m2
34-
uses: actions/cache@v3
35-
with:
36-
path: ~/.m2
37-
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
38-
restore-keys: |
39-
${{ runner.os }}-m2
40-
- name: Set argLine command line option
41-
if: ${{ matrix.java == '11' }}
42-
run: echo 'ARG_LINE=-D"argLine=--illegal-access=permit"' >> $GITHUB_ENV
43-
- name: Skip tests that require illegal reflective access
44-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.java != '11' }}
45-
run: echo 'ARG_LINE=-D"excludedGroups=RequireIllegalAccess"' >> $GITHUB_ENV
46-
- name: Skip tests that require illegal reflective access
47-
if: ${{ matrix.os != 'ubuntu-latest' && matrix.java != '11' }}
48-
run: echo 'ARG_LINE=-D"excludedGroups=TestcontainersTests,RequireIllegalAccess"' >> $GITHUB_ENV
49-
- name: Set env command line option
25+
java-version: ${{ matrix.java }}
26+
- name: Setup testContainers profile for ubuntu
5027
if: ${{ matrix.os == 'ubuntu-latest' }}
51-
run: echo 'ENV_GITHUB="-Denv.GITHUB"' >> $GITHUB_ENV
52-
- name: Test with Maven
53-
if: ${{ matrix.os != 'windows-latest' }}
54-
run: ./mvnw test -B -D"license.skip=true" -D"jacoco.skip=true" $ENV_GITHUB $ARG_LINE
55-
- name: Test with Maven
56-
if: ${{ matrix.os == 'windows-latest' && matrix.java == '11' }}
57-
run: ./mvnw test -B -D"license.skip=true" -D"jacoco.skip=true" -D"argLine=--illegal-access=permit"
28+
run: echo 'TEST_CONTAINERS_PROFILE=-PtestContainers' >> $GITHUB_ENV
5829
- name: Test with Maven
59-
if: ${{ matrix.os == 'windows-latest' && matrix.java != '11' }}
60-
run: ./mvnw test -B -D"license.skip=true" -D"jacoco.skip=true" -D"excludedGroups=TestcontainersTests,RequireIllegalAccess"
30+
run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true" $TEST_CONTAINERS_PROFILE

.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: '36 22 * * 5'
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: 17
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 & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,21 @@ jobs:
77
if: github.repository_owner == 'mybatis'
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
- name: Set up JDK
12-
uses: actions/setup-java@v3
12+
uses: actions/setup-java@v4
1313
with:
14-
java-version: 11
15-
distribution: zulu
14+
cache: maven
15+
distribution: temurin
16+
java-version: 21
1617
- name: Report Coverage to Coveralls for Pull Requests
1718
if: github.event_name == 'pull_request'
18-
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
19+
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
1920
env:
2021
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2122
PR_NUMBER: ${{ github.event.number }}
2223
- name: Report Coverage to Coveralls for General Push
2324
if: github.event_name == 'push'
24-
run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github
25+
run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
2526
env:
2627
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] prepare release')
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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ jobs:
1010
if: github.repository_owner == 'mybatis'
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
# Disabling shallow clone is recommended for improving relevancy of reporting
1616
fetch-depth: 0
1717
- name: Set up JDK
18-
uses: actions/setup-java@v3
18+
uses: actions/setup-java@v4
1919
with:
20-
java-version: 17
21-
distribution: zulu
20+
cache: maven
21+
distribution: temurin
22+
java-version: 21
2223
- name: Analyze with SonarCloud
23-
run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_mybatis-3 -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 -Dsonar.projectKey=mybatis_mybatis-3 -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
2425
env:
2526
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2627
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

.github/workflows/sonatype.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ jobs:
1010
if: github.repository_owner == 'mybatis' && ! contains(toJSON(github.event.head_commit.message), '[maven-release-plugin]')
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
- name: Set up JDK
15-
uses: actions/setup-java@v3
15+
uses: actions/setup-java@v4
1616
with:
17-
java-version: 17
18-
distribution: zulu
17+
cache: maven
18+
distribution: temurin
19+
java-version: 21
1920
- name: Deploy to Sonatype
20-
run: ./mvnw deploy -DskipTests -B --settings ./.mvn/settings.xml -Dlicense.skip=true
21+
run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true -Prelease -Dgpg.skip
2122
env:
2223
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
2324
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
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
1819
.sts4-cache/
20+
*.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 2009-2022 the original author or authors.
4+
Copyright 2009-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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
-Daether.checksums.algorithms=SHA-512,SHA-256,SHA-1,MD5 --no-transfer-progress
1+
-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 2009-2022 the original author or authors.
4+
Copyright 2009-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)