Skip to content

Commit 8741b17

Browse files
authored
Merge pull request #877 from hazendaz/master
Update GHA, update maven, sortpom
2 parents e6f7d50 + 2454d55 commit 8741b17

File tree

10 files changed

+88
-155
lines changed

10 files changed

+88
-155
lines changed

.github/workflows/ci.yaml

+5-23
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]
10+
os: [ubuntu-latest, macos-latest, windows-latest]
2911
java: [17, 21, 22-ea]
3012
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:
3618
- uses: actions/checkout@v4
37-
- name: Set up JDK
19+
- name: Set up JDK ${{ matrix.java }} ${{ matrix.distribution }}
3820
uses: actions/setup-java@v3
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/coveralls.yaml

+3-21
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,6 @@
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:
@@ -33,12 +15,12 @@ jobs:
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/sonar.yaml

+1-17
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:
@@ -36,7 +20,7 @@ jobs:
3620
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.login=$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

+1-17
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:
@@ -33,7 +17,7 @@ jobs:
3317
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 }}

.mvn/maven.config

+1
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/wrapper/MavenWrapperDownloader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* "License"); you may not use this file except in compliance
88
* with the License. You may obtain a copy of the License at
99
*
10-
* http://www.apache.org/licenses/LICENSE-2.0
10+
* https://www.apache.org/licenses/LICENSE-2.0
1111
*
1212
* Unless required by applicable law or agreed to in writing,
1313
* software distributed under the License is distributed on an

.mvn/wrapper/maven-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# "License"); you may not use this file except in compliance
77
# with the License. You may obtain a copy of the License at
88
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
9+
# https://www.apache.org/licenses/LICENSE-2.0
1010
#
1111
# Unless required by applicable law or agreed to in writing,
1212
# software distributed under the License is distributed on an

mvnw

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# "License"); you may not use this file except in compliance
99
# with the License. You may obtain a copy of the License at
1010
#
11-
# http://www.apache.org/licenses/LICENSE-2.0
11+
# https://www.apache.org/licenses/LICENSE-2.0
1212
#
1313
# Unless required by applicable law or agreed to in writing,
1414
# software distributed under the License is distributed on an

mvnw.cmd

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
@REM "License"); you may not use this file except in compliance
88
@REM with the License. You may obtain a copy of the License at
99
@REM
10-
@REM http://www.apache.org/licenses/LICENSE-2.0
10+
@REM https://www.apache.org/licenses/LICENSE-2.0
1111
@REM
1212
@REM Unless required by applicable law or agreed to in writing,
1313
@REM software distributed under the License is distributed on an

pom.xml

+73-73
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<groupId>org.mybatis</groupId>
2424
<artifactId>mybatis-parent</artifactId>
2525
<version>40</version>
26-
<relativePath />
26+
<relativePath/>
2727
</parent>
2828

2929
<artifactId>mybatis-spring</artifactId>
@@ -77,10 +77,10 @@
7777
</contributors>
7878

7979
<scm>
80-
<url>http://github.com/mybatis/spring</url>
8180
<connection>scm:git:ssh://[email protected]/mybatis/spring.git</connection>
8281
<developerConnection>scm:git:ssh://[email protected]/mybatis/spring.git</developerConnection>
8382
<tag>HEAD</tag>
83+
<url>http://github.com/mybatis/spring</url>
8484
</scm>
8585
<issueManagement>
8686
<system>GitHub Issue Management</system>
@@ -212,10 +212,10 @@
212212
<version>${spring-batch.version}</version>
213213
<scope>test</scope>
214214
<exclusions>
215-
<exclusion>
216-
<groupId>junit</groupId>
217-
<artifactId>junit</artifactId>
218-
</exclusion>
215+
<exclusion>
216+
<groupId>junit</groupId>
217+
<artifactId>junit</artifactId>
218+
</exclusion>
219219
</exclusions>
220220
</dependency>
221221

@@ -331,7 +331,72 @@
331331
</dependency>
332332
</dependencies>
333333

334+
<repositories>
335+
<repository>
336+
<id>sonatype-oss-snapshots</id>
337+
<name>Sonatype OSS Snapshots Repository</name>
338+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
339+
</repository>
340+
<repository>
341+
<releases>
342+
<enabled>false</enabled>
343+
</releases>
344+
<id>spring-snapshot</id>
345+
<name>Spring Snapshots</name>
346+
<url>https://repo.spring.io/snapshot</url>
347+
</repository>
348+
<repository>
349+
<snapshots>
350+
<enabled>false</enabled>
351+
</snapshots>
352+
<id>spring-milestone</id>
353+
<name>Spring Milestone</name>
354+
<url>https://repo.spring.io/milestone</url>
355+
</repository>
356+
</repositories>
357+
358+
<pluginRepositories>
359+
<pluginRepository>
360+
<releases>
361+
<enabled>false</enabled>
362+
</releases>
363+
<id>spring-snapshot</id>
364+
<name>Spring Snapshots</name>
365+
<url>https://repo.spring.io/snapshot</url>
366+
</pluginRepository>
367+
<pluginRepository>
368+
<snapshots>
369+
<enabled>false</enabled>
370+
</snapshots>
371+
<id>spring-milestone</id>
372+
<name>Spring Milestone</name>
373+
<url>https://repo.spring.io/milestone</url>
374+
</pluginRepository>
375+
</pluginRepositories>
376+
334377
<build>
378+
379+
<resources>
380+
<resource>
381+
<targetPath>META-INF</targetPath>
382+
<directory>${project.basedir}</directory>
383+
<includes>
384+
<include>LICENSE</include>
385+
<include>NOTICE</include>
386+
</includes>
387+
</resource>
388+
<resource>
389+
<directory>${project.basedir}/src/main/resources</directory>
390+
</resource>
391+
</resources>
392+
<testResources>
393+
<testResource>
394+
<directory>${project.build.testSourceDirectory}</directory>
395+
<excludes>
396+
<exclude>**/*.java</exclude>
397+
</excludes>
398+
</testResource>
399+
</testResources>
335400
<plugins>
336401
<plugin>
337402
<groupId>org.apache.maven.plugins</groupId>
@@ -356,10 +421,10 @@
356421
<!-- prepare site content by filtering ${project.*} values-->
357422
<execution>
358423
<id>filter-site</id>
359-
<phase>pre-site</phase>
360424
<goals>
361425
<goal>copy-resources</goal>
362426
</goals>
427+
<phase>pre-site</phase>
363428
<configuration>
364429
<outputDirectory>${project.build.directory}/site-src</outputDirectory>
365430
<resources>
@@ -378,7 +443,7 @@
378443
<configuration>
379444
<locales>en,es,zh_CN,ja,ko</locales>
380445
<siteDirectory>${project.build.directory}/site-src</siteDirectory>
381-
</configuration>
446+
</configuration>
382447
</plugin>
383448
<!-- We are not modular yet but use automatic module names, javadoc plugin has well known incorrect determination of modular, patch it -->
384449
<plugin>
@@ -394,70 +459,5 @@
394459
</configuration>
395460
</plugin>
396461
</plugins>
397-
398-
<resources>
399-
<resource>
400-
<directory>${project.basedir}</directory>
401-
<targetPath>META-INF</targetPath>
402-
<includes>
403-
<include>LICENSE</include>
404-
<include>NOTICE</include>
405-
</includes>
406-
</resource>
407-
<resource>
408-
<directory>${project.basedir}/src/main/resources</directory>
409-
</resource>
410-
</resources>
411-
<testResources>
412-
<testResource>
413-
<directory>${project.build.testSourceDirectory}</directory>
414-
<excludes>
415-
<exclude>**/*.java</exclude>
416-
</excludes>
417-
</testResource>
418-
</testResources>
419462
</build>
420-
421-
<repositories>
422-
<repository>
423-
<id>sonatype-oss-snapshots</id>
424-
<name>Sonatype OSS Snapshots Repository</name>
425-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
426-
</repository>
427-
<repository>
428-
<id>spring-snapshot</id>
429-
<name>Spring Snapshots</name>
430-
<url>https://repo.spring.io/snapshot</url>
431-
<releases>
432-
<enabled>false</enabled>
433-
</releases>
434-
</repository>
435-
<repository>
436-
<id>spring-milestone</id>
437-
<name>Spring Milestone</name>
438-
<url>https://repo.spring.io/milestone</url>
439-
<snapshots>
440-
<enabled>false</enabled>
441-
</snapshots>
442-
</repository>
443-
</repositories>
444-
445-
<pluginRepositories>
446-
<pluginRepository>
447-
<id>spring-snapshot</id>
448-
<name>Spring Snapshots</name>
449-
<url>https://repo.spring.io/snapshot</url>
450-
<releases>
451-
<enabled>false</enabled>
452-
</releases>
453-
</pluginRepository>
454-
<pluginRepository>
455-
<id>spring-milestone</id>
456-
<name>Spring Milestone</name>
457-
<url>https://repo.spring.io/milestone</url>
458-
<snapshots>
459-
<enabled>false</enabled>
460-
</snapshots>
461-
</pluginRepository>
462-
</pluginRepositories>
463463
</project>

0 commit comments

Comments
 (0)