diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 1150b09fe8..4baed6fb59 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -1,19 +1,3 @@
-#
-# Copyright 2010-2023 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
defaults:
@@ -27,19 +11,19 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
- os: [ubuntu-latest, macOS-latest, windows-latest]
- java: [11, 17, 21]
- distribution: ['zulu']
+ os: [ubuntu-latest, macos-latest, windows-latest]
+ java: [11, 17, 21, 22-ea]
+ distribution: ['temurin']
fail-fast: false
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 3b3b2451f1..329825e385 100644
--- a/.github/workflows/coveralls.yaml
+++ b/.github/workflows/coveralls.yaml
@@ -1,19 +1,3 @@
-#
-# Copyright 2016-2023 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
defaults:
@@ -35,12 +19,12 @@ jobs:
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
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
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/sonar.yaml b/.github/workflows/sonar.yaml
index e856a6d34a..bd8c9c08c2 100644
--- a/.github/workflows/sonar.yaml
+++ b/.github/workflows/sonar.yaml
@@ -1,19 +1,3 @@
-#
-# Copyright 2010-2023 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
defaults:
@@ -42,7 +26,7 @@ jobs:
- name: Analyze with SonarCloud
# Note: the mvnw executable is in the parent directory - not this working directory. We only do sonar on the
# core project, not all the test projects.
- run: ../mvnw verify jacoco:report sonar:sonar -B -Dsonar.projectKey=mybatis_generator -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_generator -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 a832481184..5f9d960970 100644
--- a/.github/workflows/sonatype.yaml
+++ b/.github/workflows/sonatype.yaml
@@ -1,19 +1,3 @@
-#
-# Copyright 2010-2023 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
defaults:
@@ -37,7 +21,7 @@ jobs:
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/core/.mvn/wrapper/MavenWrapperDownloader.java b/core/.mvn/wrapper/MavenWrapperDownloader.java
new file mode 100644
index 0000000000..f57fd86fbf
--- /dev/null
+++ b/core/.mvn/wrapper/MavenWrapperDownloader.java
@@ -0,0 +1,98 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you 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
+ *
+ * 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
+ * "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.
+ */
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.Authenticator;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+
+public final class MavenWrapperDownloader
+{
+ private static final String WRAPPER_VERSION = "3.2.0";
+
+ private static final boolean VERBOSE = Boolean.parseBoolean( System.getenv( "MVNW_VERBOSE" ) );
+
+ public static void main( String[] args )
+ {
+ log( "Apache Maven Wrapper Downloader " + WRAPPER_VERSION );
+
+ if ( args.length != 2 )
+ {
+ System.err.println( " - ERROR wrapperUrl or wrapperJarPath parameter missing" );
+ System.exit( 1 );
+ }
+
+ try
+ {
+ 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" );
+ }
+ catch ( IOException e )
+ {
+ System.err.println( "- Error downloading: " + e.getMessage() );
+ if ( VERBOSE )
+ {
+ e.printStackTrace();
+ }
+ System.exit( 1 );
+ }
+ }
+
+ private static void downloadFileFromURL( URL wrapperUrl, Path wrapperJarPath )
+ throws IOException
+ {
+ log( " - Downloading to: " + wrapperJarPath );
+ if ( System.getenv( "MVNW_USERNAME" ) != null && System.getenv( "MVNW_PASSWORD" ) != null )
+ {
+ final String username = System.getenv( "MVNW_USERNAME" );
+ final char[] password = System.getenv( "MVNW_PASSWORD" ).toCharArray();
+ Authenticator.setDefault( new Authenticator()
+ {
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication()
+ {
+ return new PasswordAuthentication( username, password );
+ }
+ } );
+ }
+ try ( InputStream inStream = wrapperUrl.openStream() )
+ {
+ Files.copy( inStream, wrapperJarPath, StandardCopyOption.REPLACE_EXISTING );
+ }
+ log( " - Downloader complete" );
+ }
+
+ private static void log( String msg )
+ {
+ if ( VERBOSE )
+ {
+ System.out.println( msg );
+ }
+ }
+
+}
diff --git a/core/pom.xml b/core/pom.xml
index 5c2d40ae31..2b2c18ad82 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -39,7 +39,7 @@
https://github.com/mybatis/generator
- scm:git:ssh://github.com/mybatis/generator.git
+ scm:git:ssh://git@github.com/mybatis/generator.git
scm:git:ssh://git@github.com/mybatis/generator.git
HEAD
@@ -60,7 +60,7 @@
eclipse-formatter-config-4space.xml
1.9.20
5.10.0
- -Djdk.attach.allowAttachSelf -Xmx1024m -Duser.timezone=UTC
+ -Xmx1024m -Duser.timezone=UTC
1676846560