diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 61ccd033d..55c01bcfa 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -1,22 +1,6 @@
-#
-# Copyright 2016-2022 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
name: Java CI
-on: [push, pull_request]
+on: [workflow_dispatch, push, pull_request]
jobs:
test:
@@ -24,18 +8,18 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
- java: [11, 17, 20]
- distribution: ['zulu']
+ java: [11, 17, 21, 22-ea]
+ distribution: ['temurin']
fail-fast: false
- max-parallel: 5
+ max-parallel: 4
name: Test JDK ${{ matrix.java }}, ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- - name: Set up JDK
+ - name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: ${{ matrix.distribution }}
- name: Test with Maven
- run: ./mvnw test -B -D"license.skip=true"
+ run: ./mvnw test -B -V --no-transfer-progress -D"license.skip=true"
diff --git a/.github/workflows/coveralls.yaml b/.github/workflows/coveralls.yaml
index 9b8844724..03df1ede1 100644
--- a/.github/workflows/coveralls.yaml
+++ b/.github/workflows/coveralls.yaml
@@ -1,19 +1,3 @@
-#
-# Copyright 2016-2022 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
name: Coveralls
on: [push, pull_request]
@@ -27,16 +11,16 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
- java-version: 20
+ java-version: 21
distribution: zulu
- name: Report Coverage to Coveralls for Pull Requests
if: github.event_name == 'pull_request'
- run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER
+ run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github -DpullRequest=$PR_NUMBER --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_NUMBER: ${{ github.event.number }}
- name: Report Coverage to Coveralls for General Push
if: github.event_name == 'push'
- run: ./mvnw test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github
+ run: ./mvnw -B -V test jacoco:report coveralls:report -q -Dlicense.skip=true -DrepoToken=$GITHUB_TOKEN -DserviceName=github --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml
index ea85484b2..17c0a4c23 100644
--- a/.github/workflows/sonar.yaml
+++ b/.github/workflows/sonar.yaml
@@ -1,19 +1,3 @@
-#
-# Copyright 2016-2022 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
name: SonarCloud
on:
@@ -33,10 +17,10 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
- java-version: 20
+ java-version: 21
distribution: zulu
- name: Analyze with SonarCloud
- run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_mybatis-dynamic-sql -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
+ run: ./mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_mybatis-dynamic-sql -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true --no-transfer-progress
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
diff --git a/.github/workflows/sonatype.yaml b/.github/workflows/sonatype.yaml
index cd16ed55b..46800b489 100644
--- a/.github/workflows/sonatype.yaml
+++ b/.github/workflows/sonatype.yaml
@@ -1,19 +1,3 @@
-#
-# Copyright 2016-2022 the original author or authors.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
name: Sonatype
on:
@@ -30,10 +14,10 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
- java-version: 20
+ java-version: 21
distribution: zulu
- name: Deploy to Sonatype
- run: ./mvnw deploy -DskipTests -B --settings ./.mvn/settings.xml -Dlicense.skip=true
+ run: ./mvnw deploy -DskipTests -B -V --no-transfer-progress --settings ./.mvn/settings.xml -Dlicense.skip=true
env:
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
diff --git a/.mvn/maven.config b/.mvn/maven.config
index 956533e67..afdcfab79 100644
--- a/.mvn/maven.config
+++ b/.mvn/maven.config
@@ -1 +1,2 @@
-Daether.checksums.algorithms=SHA-512,SHA-256,SHA-1,MD5
+-Daether.connector.smartChecksums=false
diff --git a/.mvn/settings.xml b/.mvn/settings.xml
index e0d52110c..4148a8bfb 100644
--- a/.mvn/settings.xml
+++ b/.mvn/settings.xml
@@ -24,8 +24,13 @@
${env.CI_DEPLOY_USERNAME}
${env.CI_DEPLOY_PASSWORD}
+
- gh-pages
+ gh-pages-scm
+
+ branch
+ gh-pages
+
github
diff --git a/.mvn/wrapper/MavenWrapperDownloader.java b/.mvn/wrapper/MavenWrapperDownloader.java
index 732313c43..f57fd86fb 100644
--- a/.mvn/wrapper/MavenWrapperDownloader.java
+++ b/.mvn/wrapper/MavenWrapperDownloader.java
@@ -7,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
@@ -23,85 +23,50 @@
import java.net.PasswordAuthentication;
import java.net.URL;
import java.nio.file.Files;
-import java.nio.file.LinkOption;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
-import java.nio.file.StandardOpenOption;
-import java.util.Properties;
public final class MavenWrapperDownloader
{
- private static final String WRAPPER_VERSION = "3.1.1";
+ private static final String WRAPPER_VERSION = "3.2.0";
private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) );
- /**
- * Default URL to download the maven-wrapper.jar from, if no 'downloadUrl' is provided.
- */
- private static final String DEFAULT_DOWNLOAD_URL =
- "https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/" + WRAPPER_VERSION
- + "/maven-wrapper-" + WRAPPER_VERSION + ".jar";
-
- /**
- * Path to the maven-wrapper.properties file, which might contain a downloadUrl property to use instead of the
- * default one.
- */
- private static final String MAVEN_WRAPPER_PROPERTIES_PATH = ".mvn/wrapper/maven-wrapper.properties";
-
- /**
- * Path where the maven-wrapper.jar will be saved to.
- */
- private static final String MAVEN_WRAPPER_JAR_PATH = ".mvn/wrapper/maven-wrapper.jar";
-
- /**
- * Name of the property which should be used to override the default download url for the wrapper.
- */
- private static final String PROPERTY_NAME_WRAPPER_URL = "wrapperUrl";
-
public static void main( String[] args )
{
- if ( args.length == 0 )
- {
- System.err.println( " - ERROR projectBasedir parameter missing" );
- System.exit( 1 );
- }
+ log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION );
- log( " - Downloader started" );
- final String dir = args[0].replace( "..", "" ); // Sanitize path
- final Path projectBasedir = Paths.get( dir ).toAbsolutePath().normalize();
- if ( !Files.isDirectory( projectBasedir, LinkOption.NOFOLLOW_LINKS ) )
+ if ( args.length != 2 )
{
- System.err.println( " - ERROR projectBasedir not exists: " + projectBasedir );
+ System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" );
System.exit( 1 );
}
- log( " - Using base directory: " + projectBasedir );
-
- // If the maven-wrapper.properties exists, read it and check if it contains a custom
- // wrapperUrl parameter.
- Path mavenWrapperPropertyFile = projectBasedir.resolve( MAVEN_WRAPPER_PROPERTIES_PATH );
- String url = readWrapperUrl( mavenWrapperPropertyFile );
-
try
{
- Path outputFile = projectBasedir.resolve( MAVEN_WRAPPER_JAR_PATH );
- createDirectories( outputFile.getParent() );
- downloadFileFromURL( url, outputFile );
+ log( " - Downloader started" );
+ final URL wrapperUrl = new URL( args[0] );
+ final String jarPath = args[1].replace( "..", "" ); // Sanitize path
+ final Path wrapperJarPath = Paths.get( jarPath ).toAbsolutePath().normalize();
+ downloadFileFromURL( wrapperUrl, wrapperJarPath );
log( "Done" );
- System.exit( 0 );
}
catch ( IOException e )
{
- System.err.println( "- Error downloading" );
- e.printStackTrace();
+ System.err.println( "- Error downloading: " + e.getMessage() );
+ if ( VERBOSE )
+ {
+ e.printStackTrace();
+ }
System.exit( 1 );
}
}
- private static void downloadFileFromURL( String urlString, Path destination ) throws IOException
+ private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath )
+ throws IOException
{
- log( " - Downloading to: " + destination );
+ log( " - Downloading to: " + wrapperJarPath );
if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null )
{
final String username = System.getenv( "MVNW_USERNAME" );
@@ -115,40 +80,11 @@ protected PasswordAuthentication getPasswordAuthentication()
}
} );
}
- URL website = new URL( urlString );
- try ( InputStream inStream = website.openStream() ) {
- Files.copy( inStream, destination, StandardCopyOption.REPLACE_EXISTING );
- }
- log( " - Downloader complete" );
- }
-
- private static void createDirectories(Path outputPath) throws IOException
- {
- if ( !Files.isDirectory( outputPath, LinkOption.NOFOLLOW_LINKS ) ) {
- Path createDirectories = Files.createDirectories( outputPath );
- log( " - Directories created: " + createDirectories );
- }
- }
-
- private static String readWrapperUrl( Path mavenWrapperPropertyFile )
- {
- String url = DEFAULT_DOWNLOAD_URL;
- if ( Files.exists( mavenWrapperPropertyFile, LinkOption.NOFOLLOW_LINKS ) )
+ try ( InputStream inStream = wrapperUrl.openStream() )
{
- log( " - Reading property file: " + mavenWrapperPropertyFile );
- try ( InputStream in = Files.newInputStream( mavenWrapperPropertyFile, StandardOpenOption.READ ) )
- {
- Properties mavenWrapperProperties = new Properties();
- mavenWrapperProperties.load( in );
- url = mavenWrapperProperties.getProperty( PROPERTY_NAME_WRAPPER_URL, DEFAULT_DOWNLOAD_URL );
- }
- catch ( IOException e )
- {
- System.err.println( " - ERROR loading '" + MAVEN_WRAPPER_PROPERTIES_PATH + "'" );
- }
+ Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING );
}
- log( " - Downloading from: " + url );
- return url;
+ log( " - Downloader complete" );
}
private static void log( String msg )
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index eacdc9ed1..39a584eb2 100644
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -6,7 +6,7 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
diff --git a/mvnw b/mvnw
index 8d937f4c1..66df28542 100755
--- a/mvnw
+++ b/mvnw
@@ -8,7 +8,7 @@
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
-# http://www.apache.org/licenses/LICENSE-2.0
+# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
diff --git a/mvnw.cmd b/mvnw.cmd
index c4586b564..95ba6f54a 100644
--- a/mvnw.cmd
+++ b/mvnw.cmd
@@ -7,7 +7,7 @@
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
-@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM https://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
diff --git a/pom.xml b/pom.xml
index 5873e1e8a..2a0f58249 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,3 +1,4 @@
+
+
+ org.hamcrest
+ hamcrest
+ 2.2
+ test
+
+
+
+ org.testcontainers
+ postgresql
+ ${test.containers.version}
+ test
+
+
+ org.testcontainers
+ junit-jupiter
+ ${test.containers.version}
+ test
+
+
+ org.postgresql
+ postgresql
+ 42.6.0
+ test
+
+
+ org.testcontainers
+ mariadb
+ ${test.containers.version}
+ test
+
+
+ org.mariadb.jdbc
+ mariadb-java-client
+ 3.2.0
+ test
+
+
+
@@ -148,17 +274,17 @@
java-compile
- compile
compile
+ compile
java-test-compile
- test-compile
testCompile
+ test-compile
@@ -169,10 +295,10 @@
copy-changelog
- pre-site
copy-resources
+ pre-site
${project.build.directory}/generated-site/markdown/docs
@@ -199,10 +325,10 @@
3.4.0
- generate-sources
add-source
+ generate-sources
${project.basedir}/src/main/kotlin
@@ -214,127 +340,4 @@
-
-
- org.jetbrains.kotlin
- kotlin-stdlib-jdk8
- ${kotlin.version}
- provided
- true
-
-
- org.springframework
- spring-jdbc
- 5.3.30
- provided
- true
-
-
- org.mybatis
- mybatis
- 3.5.14
- provided
- true
-
-
-
- org.jetbrains.kotlin
- kotlin-compiler
- ${kotlin.version}
- test
-
-
- org.junit.jupiter
- junit-jupiter-engine
- ${junit.jupiter.version}
- test
-
-
- org.junit.jupiter
- junit-jupiter-params
- ${junit.jupiter.version}
- test
-
-
- org.assertj
- assertj-core
- 3.24.2
- test
-
-
- org.mybatis
- mybatis-spring
- 2.1.1
- test
-
-
- org.hsqldb
- hsqldb
- 2.7.2
- test
-
-
- org.springframework.batch
- spring-batch-core
- ${spring.batch.version}
- test
-
-
- org.springframework.batch
- spring-batch-test
- ${spring.batch.version}
- test
-
-
- junit
- junit
-
-
-
-
- ch.qos.logback
- logback-classic
- 1.4.11
- test
-
-
-
- org.hamcrest
- hamcrest
- 2.2
- test
-
-
-
- org.testcontainers
- postgresql
- ${test.containers.version}
- test
-
-
- org.testcontainers
- junit-jupiter
- ${test.containers.version}
- test
-
-
- org.postgresql
- postgresql
- 42.6.0
- test
-
-
- org.testcontainers
- mariadb
- ${test.containers.version}
- test
-
-
- org.mariadb.jdbc
- mariadb-java-client
- 3.2.0
- test
-
-
-