Skip to content

Commit

Permalink
Merge pull request #544 from hazendaz/master
Browse files Browse the repository at this point in the history
Review and cleanup pom in prep for next release
  • Loading branch information
hazendaz authored Nov 4, 2023
2 parents adc4940 + a6598fb commit a6ffd06
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 83 deletions.
26 changes: 5 additions & 21 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2010-2020 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
#
# 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.
#

name: Java CI

on: [workflow_dispatch, push, pull_request]
Expand All @@ -23,19 +7,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"
18 changes: 1 addition & 17 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2010-2020 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
#
# 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.
#

name: SonarCloud

on:
Expand All @@ -36,7 +20,7 @@ jobs:
java-version: 21
distribution: zulu
- name: Analyze with SonarCloud
run: ./mvnw verify sonar:sonar -B -Dsonar.projectKey=mybatis_parent -Dsonar.organization=mybatis -Dsonar.host.url=https://sonarcloud.io -Dsonar.login=$SONAR_TOKEN -Dlicense.skip=true
run: ./mvnw verify sonar:sonar -B -Dsonar.projectKey=mybatis_parent -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 }}
18 changes: 1 addition & 17 deletions .github/workflows/sonatype.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
#
# Copyright 2010-2020 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
#
# 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.
#

name: Sonatype

on:
Expand All @@ -33,7 +17,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 }}
59 changes: 34 additions & 25 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
<maven.compiler.testRelease>${java.test.release.version}</maven.compiler.testRelease>

<!-- Maven minimum version -->
<maven.min-version>3.5.0</maven.min-version>
<maven.min-version>3.9.5</maven.min-version>

<!-- Project Encoding -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -466,6 +466,7 @@
<!-- Default mapping located at https://github.com/mathieucarbou/license-maven-plugin/blob/master/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/document/DocumentType.java -->
<xml.vm>XML_STYLE</xml.vm>
</mapping>
<prohibitLegacyUse>true</prohibitLegacyUse>
</configuration>
<dependencies>
<dependency>
Expand Down Expand Up @@ -534,7 +535,7 @@
<!-- stops the "uses" clauses being added to "Export-Package" manifest entry -->
<_nouses>true</_nouses>
<!-- Stop the JAVA_1_n_HOME / JAVA_n_HOME variables from being treated as headers by Bnd if found in settings.xml (obsolete versions removed, if found, cleanup settings.xml) -->
<_removeheaders>JAVA_1_8_HOME,JAVA_8_HOME,JAVA_11_HOME,JAVA_17_HOME,JAVA_20_HOME,JAVA_21_HOME</_removeheaders>
<_removeheaders>JAVA_1_8_HOME,JAVA_8_HOME,JAVA_11_HOME,JAVA_17_HOME,JAVA_21_HOME,JAVA_22_HOME</_removeheaders>
<Bundle-SymbolicName>${osgi.symbolicName}</Bundle-SymbolicName>
<Export-Package>${osgi.export}</Export-Package>
<Private-Package>${osgi.private}</Private-Package>
Expand Down Expand Up @@ -686,7 +687,7 @@
<version>${javadoc.plugin}</version>
<configuration>
<additionalOptions>
<option>${html.javadocType}</option>
<additionalOption>${html.javadocType}</additionalOption>
</additionalOptions>
<archive>
<manifest>
Expand All @@ -703,6 +704,7 @@
<X-Compile-Release-JDK>${maven.compiler.release}</X-Compile-Release-JDK>
</manifestEntries>
</archive>
<legacyMode>true</legacyMode>
<notimestamp>true</notimestamp>
<quiet>true</quiet>
</configuration>
Expand Down Expand Up @@ -1076,15 +1078,37 @@
<configuration>
<tagListOptions>
<tagClasses>
<tagClass>
<displayName>FIXME Work</displayName>
<tags>
<tag>
<matchString>fixme</matchString>
<matchType>ignoreCase</matchType>
</tag>
<tag>
<matchString>@fixme</matchString>
<matchType>ignoreCase</matchType>
</tag>
</tags>
</tagClass>
<tagClass>
<displayName>Todo Work</displayName>
<tags>
<tag>
<matchString>TODO</matchString>
<matchString>todo</matchString>
<matchType>ignoreCase</matchType>
</tag>
<tag>
<matchString>FIXME</matchString>
<matchString>@todo</matchString>
<matchType>ignoreCase</matchType>
</tag>
</tags>
</tagClass>
<tagClass>
<displayName>Deprecated Work</displayName>
<tags>
<tag>
<matchString>@deprecated</matchString>
<matchType>ignoreCase</matchType>
</tag>
</tags>
Expand Down Expand Up @@ -1128,8 +1152,7 @@
<id>format</id>
<activation>
<file>
<!-- project.basedir is invalid in this location as not resolved by this point, use basedir -->
<exists>${basedir}/format.xml</exists>
<exists>${project.basedir}/format.xml</exists>
</file>
</activation>
<build>
Expand Down Expand Up @@ -1302,8 +1325,7 @@
<id>license</id>
<activation>
<file>
<!-- project.basedir is invalid in this location as not resolved by this point, use basedir -->
<exists>${basedir}/LICENSE_HEADER</exists>
<exists>${project.basedir}/LICENSE_HEADER</exists>
</file>
</activation>
<build>
Expand Down Expand Up @@ -1333,8 +1355,9 @@
</activation>
<properties>
<!-- Make m2e use java at test revision level -->
<java.version>${java.test.version}</java.version>
<java.release.version>${java.test.release.version}</java.release.version>
<maven.compiler.source>${java.test.version}</maven.compiler.source>
<maven.compiler.target>${java.test.release.version}</maven.compiler.target>
<maven.compiler.release>${java.test.release.version}</maven.compiler.release>
</properties>
<build>
<pluginManagement>
Expand All @@ -1348,20 +1371,6 @@
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<!-- license m2e not in plugin, add ignore here (while possible to run this, its too slow) -->
<pluginExecution>
<pluginExecutionFilter>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<versionRange>[${license.version},)</versionRange>
<goals>
<goal>format</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
<!-- impsort m2e in plugin states to ignore, we will process -->
<pluginExecution>
<pluginExecutionFilter>
Expand Down
6 changes: 3 additions & 3 deletions src/site/site.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2010-2022 the original author or authors.
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.
Expand All @@ -23,9 +23,9 @@

<bannerRight>
<name>MyBatis</name>
<src>http://www.mybatis.org/images/mybatis-logo.png</src>
<src>https://www.mybatis.org/images/mybatis-logo.png</src>
<alt>MyBatis logo</alt>
<href>http://www.mybatis.org/</href>
<href>https://blog.mybatis.org/</href>
</bannerRight>

<publishDate format="dd MMMM yyyy" position="left" />
Expand Down

0 comments on commit a6ffd06

Please sign in to comment.