diff --git a/.gitattributes b/.gitattributes index 6801e83..6eeb2e6 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12,3 +12,8 @@ SECURITY.md linguist-generated=true .settings/org.eclipse.jdt.core.prefs linguist-generated=true .settings/org.eclipse.jdt.ui.prefs linguist-generated=true +*.sh text eol=lf +*.bat text eol=crlf +/mvnw linguist-generated=true +/mvnw.cmd linguist-generated=true +/.mvn/wrapper/maven-wrapper.properties linguist-generated=true diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index a9305aa..9ff2410 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -50,13 +50,18 @@ jobs: } - name: Set up JDKs id: setup-java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: temurin java-version: |- 17 21 cache: maven + - { + name: Prepare Maven Wrapper, + id: prepare-maven-wrapper, + run: MVNW_VERBOSE=true ./mvnw -version + } - name: Cache SonarCloud packages id: cache-sonar uses: actions/cache@v6 @@ -73,16 +78,16 @@ jobs: - name: Run tests and build with Maven id: build-pk-verify run: | - mvn --batch-mode clean verify install \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ + ./mvnw --batch-mode clean install \ + --no-transfer-progress \ -DossindexSkip=true -DtrimStackTrace=false - name: Sonar analysis id: sonar-analysis if: ${{ env.SONAR_TOKEN != null }} run: | - mvn --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ + ./mvnw --batch-mode org.sonarsource.scanner.maven:sonar-maven-plugin:sonar \ -DossindexSkip=true \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ + --no-transfer-progress \ -DtrimStackTrace=false \ -Dsonar.token=$SONAR_TOKEN env: { @@ -92,7 +97,7 @@ jobs: - { id: run-error-code-crawler, name: Run error-code-crawler on itself, - run: 'mvn --batch-mode error-code-crawler:verify' + run: './mvnw --batch-mode error-code-crawler:verify' } - name: Verify Release Artifacts id: verify-release-artifacts @@ -176,7 +181,7 @@ jobs: } - name: Set up JDK 21 id: setup-java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: { distribution: temurin, java-version: '21', @@ -185,8 +190,8 @@ jobs: - name: Run tests and build with Maven 21 id: build-next-java run: | - mvn --batch-mode clean package -DtrimStackTrace=false -Djava.version=21 \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ + ./mvnw --batch-mode clean package -DtrimStackTrace=false -Djava.version=21 \ + --no-transfer-progress \ -DossindexSkip=true \ ossindex: runs-on: ubuntu-latest @@ -210,7 +215,7 @@ jobs: } - name: Set up JDKs id: setup-java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: temurin java-version: |- @@ -218,15 +223,15 @@ jobs: 21 cache: maven server-id: ossindex - server-username: OSSINDEX_USERNAME - server-password: OSSINDEX_API_TOKEN + server-username-env-var: OSSINDEX_USERNAME + server-password-env-var: OSSINDEX_API_TOKEN - name: Run Ossindex id: ossindex run: | - mvn --batch-mode test-compile \ + ./mvnw --batch-mode test-compile \ org.sonatype.ossindex.maven:ossindex-maven-plugin:audit \ org.sonatype.ossindex.maven:ossindex-maven-plugin:audit-aggregate \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn + --no-transfer-progress env: { OSSINDEX_USERNAME: '${{ secrets.OSSINDEX_USERNAME }}', OSSINDEX_API_TOKEN: '${{ secrets.OSSINDEX_API_TOKEN }}' @@ -238,9 +243,7 @@ jobs: shell: bash } permissions: { - security-events: write, - contents: read, - actions: read + contents: read } concurrency: { group: '${{ github.workflow }}-github-actions-linter-${{ github.ref }}', @@ -253,9 +256,9 @@ jobs: with: { persist-credentials: false } - - name: Lint GitHub actions with Zizmore + - name: Lint GitHub actions with Zizmor id: lint-github-actions - uses: zizmorcore/zizmor-action@192e21d79ab29983730a13d1382995c2307fbcaa + uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 with: { advanced-security: false } @@ -288,7 +291,7 @@ jobs: } - name: Set up JDKs id: setup-java - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: temurin java-version: |- @@ -299,7 +302,7 @@ jobs: id: check-release if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') }} run: | - if mvn --batch-mode com.exasol:project-keeper-maven-plugin:verify-release --projects .; then + if ./mvnw --batch-mode com.exasol:project-keeper-maven-plugin:verify-release --projects .; then echo "### ✅ Release preconditions met, start release" >> "$GITHUB_STEP_SUMMARY" echo "release-required=true" >> "$GITHUB_OUTPUT" else @@ -323,7 +326,7 @@ jobs: actions: read, issues: read } - uses: ./.github/workflows/release.yml + uses: $/.github/workflows/release.yml with: { started-from-ci: true, maven-central-auto-publish: true diff --git a/.github/workflows/dependencies_check.yml b/.github/workflows/dependencies_check.yml index 5f1c7f0..ebfede1 100644 --- a/.github/workflows/dependencies_check.yml +++ b/.github/workflows/dependencies_check.yml @@ -33,7 +33,7 @@ jobs: } - name: Set up JDKs id: setup-jdks - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: temurin java-version: |- @@ -41,12 +41,17 @@ jobs: 21 cache: maven server-id: ossindex - server-username: OSSINDEX_USERNAME - server-password: OSSINDEX_API_TOKEN + server-username-env-var: OSSINDEX_USERNAME + server-password-env-var: OSSINDEX_API_TOKEN + - { + name: Prepare Maven Wrapper, + id: prepare-maven-wrapper, + run: MVNW_VERBOSE=true ./mvnw -version + } - name: Generate ossindex report id: ossindex-report run: | - mvn --batch-mode org.sonatype.ossindex.maven:ossindex-maven-plugin:audit \ + ./mvnw --batch-mode org.sonatype.ossindex.maven:ossindex-maven-plugin:audit \ org.sonatype.ossindex.maven:ossindex-maven-plugin:audit-aggregate \ -Dossindex.reportFile=$(pwd)/ossindex-report.json \ -Dossindex.fail=false @@ -56,7 +61,7 @@ jobs: } - name: Create GitHub Issues id: create-security-issues - uses: exasol/python-toolbox/.github/actions/security-issues@10.1.0 + uses: exasol/python-toolbox/.github/actions/security-issues@11.0.0 with: { format: maven, command: cat ossindex-report.json, @@ -82,7 +87,7 @@ jobs: contents: write, pull-requests: write } - uses: ./.github/workflows/dependencies_update.yml + uses: $/.github/workflows/dependencies_update.yml with: { vulnerability_issues: '${{ needs.report_security_issues.outputs.created-issues }}' } diff --git a/.github/workflows/dependencies_update.yml b/.github/workflows/dependencies_update.yml index c0bf002..6c6296e 100644 --- a/.github/workflows/dependencies_update.yml +++ b/.github/workflows/dependencies_update.yml @@ -42,13 +42,18 @@ jobs: } - name: Set up JDKs id: setup-jdks - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: temurin java-version: |- 17 21 cache: maven + - { + name: Prepare Maven Wrapper, + id: prepare-maven-wrapper, + run: MVNW_VERBOSE=true ./mvnw -version + } - name: Print issues id: debug-print-issues run: | @@ -70,7 +75,7 @@ jobs: - name: Update dependencies id: update-dependencies run: | - mvn --batch-mode com.exasol:project-keeper-maven-plugin:update-dependencies --projects . \ + ./mvnw --batch-mode com.exasol:project-keeper-maven-plugin:update-dependencies --projects . \ -Dproject-keeper:vulnerabilities="$CREATED_ISSUES" env: { CREATED_ISSUES: '${{ inputs.vulnerability_issues }}' @@ -90,7 +95,7 @@ jobs: echo '# ⚠️ Notes ⚠️' >> "$GITHUB_OUTPUT" echo '## Run PK fix manually' >> "$GITHUB_OUTPUT" echo 'Due to restrictions workflow `dependencies_update.yml` cannot update other workflows, see https://github.com/exasol/project-keeper/issues/578 for details.' >> "$GITHUB_OUTPUT" - echo 'Please checkout this PR locally and run `mvn com.exasol:project-keeper-maven-plugin:fix --projects .`' >> "$GITHUB_OUTPUT" + echo 'Please checkout this PR locally and run `./mvnw com.exasol:project-keeper-maven-plugin:fix --projects .`' >> "$GITHUB_OUTPUT" echo '## This PR does not trigger CI workflows' >> "$GITHUB_OUTPUT" echo 'Please click the **Close pull request** button and then **Reopen pull request** to trigger running checks.' >> "$GITHUB_OUTPUT" echo 'See https://github.com/exasol/project-keeper/issues/534 for details.' >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b6dddb..28877fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -83,27 +83,60 @@ jobs: - name: Set up Maven Central Repository id: configure-maven-central-credentials if: ${{ true }} - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: temurin java-version: |- 17 21 server-id: maven-central-portal - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD + server-username-env-var: MAVEN_USERNAME + server-password-env-var: MAVEN_PASSWORD gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - gpg-passphrase: MAVEN_GPG_PASSPHRASE + gpg-passphrase-env-var: MAVEN_GPG_PASSPHRASE + - name: Validate Maven Central GPG signing key + id: validate-gpg-signing-key + if: ${{ true }} + run: | + gpg_keys="$(gpg --list-secret-keys)" + echo "$gpg_keys" + if ! grep -q '^sec ' <<< "$gpg_keys"; then + echo "The Maven Central GPG signing key is missing." >&2 + echo "Please update OSSRH_GPG_SECRET_KEY." >&2 + exit 1 + fi + if grep -Eq '^sec .*\[expired:' <<< "$gpg_keys" || \ + grep -Eq '^ssb .*\[[^]]*S[^]]*\].*\[expired:' <<< "$gpg_keys"; then + echo "The Maven Central GPG signing key is expired." >&2 + echo "Please update OSSRH_GPG_SECRET_KEY." >&2 + exit 1 + fi + if ! printf '%s' 'Project Keeper GPG signing key validation' | \ + gpg --batch --yes --pinentry-mode loopback --passphrase "$MAVEN_GPG_PASSPHRASE" \ + --armor --detach-sign --output /dev/null; then + echo "The Maven Central GPG signing key failed to sign an artifact." >&2 + echo "Please update OSSRH_GPG_SECRET_KEY and OSSRH_GPG_SECRET_KEY_PASSWORD." >&2 + exit 1 + fi + echo "The Maven Central GPG signing key was validated successfully." + env: { + MAVEN_GPG_PASSPHRASE: '${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}' + } - name: Set up JDKs id: setup-jdks if: ${{ ! true }} - uses: actions/setup-java@v5 + uses: actions/setup-java@v6 with: distribution: temurin java-version: |- 17 21 cache: maven + - { + name: Prepare Maven Wrapper, + id: prepare-maven-wrapper, + run: MVNW_VERBOSE=true ./mvnw -version + } - name: Fail if not running on main or release branch id: check-main-or-release-branch if: ${{ github.ref != 'refs/heads/main' && !startsWith(github.ref, 'refs/heads/release/') }} @@ -138,7 +171,7 @@ jobs: - name: Verify release preconditions id: verify-release run: | - mvn --batch-mode com.exasol:project-keeper-maven-plugin:verify-release --projects . + ./mvnw --batch-mode com.exasol:project-keeper-maven-plugin:verify-release --projects . echo "$GITHUB_OUTPUT" env: { GITHUB_TOKEN: '${{ github.token }}' @@ -146,25 +179,19 @@ jobs: - { name: Build Project, id: build, - run: mvn --batch-mode -DskipTests -DossindexSkip=true clean install verify + run: ./mvnw --batch-mode -DskipTests -DskipITs -DossindexSkip=true clean install } - { id: run-error-code-crawler, name: Run error-code-crawler on itself, - run: 'mvn --batch-mode error-code-crawler:verify' - } - - { - name: List secret GPG keys, - id: list-secret-gpg-keys, - if: '${{ true && (! inputs.skip-maven-central) }}', - run: gpg --list-secret-keys + run: './mvnw --batch-mode error-code-crawler:verify' } - name: Publish to Central Repository id: deploy-maven-central if: ${{ true && (! inputs.skip-maven-central) }} run: | echo "#### Maven Central Release" >> "$GITHUB_STEP_SUMMARY" - mvn --batch-mode -Dgpg.skip=false -DskipTests -DossindexSkip=true deploy \ + ./mvnw --batch-mode -Dgpg.skip=false -DskipTests -DskipITs -DossindexSkip=true deploy \ -Dcentral-publishing.deploymentName="Auto release of repo ${{ github.repository }} using PK release.yml" \ -Dcentral-publishing.autoPublish=${{ inputs.maven-central-auto-publish }} if [[ "${{ inputs.maven-central-auto-publish }}" == "true" ]]; then diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..3329cf8 --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,6 @@ +# This file was generated by Project Keeper. +wrapperVersion=3.3.4 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.10.0/apache-maven-3.10.0-bin.zip +# sha512sum: 22d31676d5b92ed53308c19ecded3245d0efd0cddfec51ec7bab62f4f13ad70ddddceff8e62940e0e8e2421f3cde8106737f4becec0aa034ffeff2a754e88337 +distributionSha256Sum=1f6d9909266510f039f59aa0e13dcd2c66da85f043e56276e41f2918f8bddaff diff --git a/.project-keeper.yml b/.project-keeper.yml index 74a2e13..8566f6e 100644 --- a/.project-keeper.yml +++ b/.project-keeper.yml @@ -18,8 +18,8 @@ build: name: Run tests and build with Maven id: build-pk-verify run: | - mvn --batch-mode clean verify install \ - -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn \ + ./mvnw --batch-mode clean install \ + --no-transfer-progress \ -DossindexSkip=true -DtrimStackTrace=false - action: INSERT_AFTER stepId: sonar-analysis @@ -27,7 +27,7 @@ build: content: id: run-error-code-crawler name: Run error-code-crawler on itself - run: mvn --batch-mode error-code-crawler:verify + run: ./mvnw --batch-mode error-code-crawler:verify - name: "release.yml" stepCustomizations: @@ -36,10 +36,10 @@ build: content: name: Build Project id: build - run: mvn --batch-mode -DskipTests -DossindexSkip=true clean install verify + run: ./mvnw --batch-mode -DskipTests -DskipITs -DossindexSkip=true clean install - action: INSERT_AFTER stepId: build content: id: run-error-code-crawler name: Run error-code-crawler on itself - run: mvn --batch-mode error-code-crawler:verify + run: ./mvnw --batch-mode error-code-crawler:verify diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 4d4865e..fbf2df8 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -258,6 +258,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variabl org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_record_parameter=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert @@ -508,7 +509,7 @@ org.eclipse.jdt.core.formatter.put_text_block_quotes_on_new_line=false org.eclipse.jdt.core.formatter.tabulation.char=space org.eclipse.jdt.core.formatter.tabulation.size=4 org.eclipse.jdt.core.formatter.text_block_indentation=0 -org.eclipse.jdt.core.formatter.use_on_off_tags=false +org.eclipse.jdt.core.formatter.use_on_off_tags=true org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=true org.eclipse.jdt.core.formatter.wrap_before_additive_operator=true org.eclipse.jdt.core.formatter.wrap_before_assertion_message_operator=true diff --git a/dependencies.md b/dependencies.md index 42c6d74..d421fec 100644 --- a/dependencies.md +++ b/dependencies.md @@ -65,9 +65,9 @@ [0]: https://maven.apache.org/plugin-tools/maven-plugin-annotations [1]: https://www.apache.org/licenses/LICENSE-2.0.txt -[2]: https://maven.apache.org/ref/3.9.16/maven-plugin-api/ -[3]: https://maven.apache.org/ref/3.9.16/maven-model/ -[4]: https://maven.apache.org/ref/3.9.16/maven-core/ +[2]: https://maven.apache.org/ref/3.10.0/maven-plugin-api/ +[3]: https://maven.apache.org/ref/3.10.0/maven-model/ +[4]: https://maven.apache.org/ref/3.10.0/maven-core/ [5]: https://spoon.gforge.inria.fr/ [6]: https://cecill.info/licences/Licence_CeCILL-C_V1-en.txt [7]: https://opensource.org/licenses/MIT @@ -80,7 +80,7 @@ [14]: http://www.apache.org/licenses/LICENSE-2.0.txt [15]: https://github.com/exasol/error-code-model-java/ [16]: https://github.com/exasol/error-code-model-java/blob/main/LICENSE -[17]: https://maven.apache.org/ref/3.9.16/maven-artifact/ +[17]: https://maven.apache.org/ref/3.10.0/maven-artifact/ [18]: http://hamcrest.org/JavaHamcrest/ [19]: https://raw.githubusercontent.com/hamcrest/JavaHamcrest/master/LICENSE [20]: https://www.jqno.nl/equalsverifier diff --git a/doc/changes/changelog.md b/doc/changes/changelog.md index 5571494..b6da9b3 100644 --- a/doc/changes/changelog.md +++ b/doc/changes/changelog.md @@ -1,5 +1,6 @@ # Changes +* [2.1.3](changes_2.1.3.md) * [2.1.2](changes_2.1.2.md) * [2.1.1](changes_2.1.1.md) * [2.1.0](changes_2.1.0.md) diff --git a/doc/changes/changes_2.1.3.md b/doc/changes/changes_2.1.3.md new file mode 100644 index 0000000..7a4be3b --- /dev/null +++ b/doc/changes/changes_2.1.3.md @@ -0,0 +1,48 @@ +# Error Code Crawler Maven Plugin 2.1.3, released 2026-10-22 + +Code name: Support Java 25 and fix vulnerabilities + +## Summary + +This release adds support for crawling projects that use Java 25. It also fixes vulnerabilities in dependencies `com.fasterxml.jackson.core:jackson-core`, `com.fasterxml.jackson.core:jackson-databind` and `org.ow2.asm:asm`. + +## Bugfixes + +* #117: Error crawler fails with Java 25 + +## Security + +* #131: Fixed vulnerability CVE-2026-91776 in dependency `com.fasterxml.jackson.core:jackson-databind:jar:2.22.2:compile` +* #132: Fixed vulnerability CVE-2026-91777 in dependency `com.fasterxml.jackson.core:jackson-databind:jar:2.22.2:compile` +* #134: Fixed vulnerability CVE-2026-89407 in dependency `com.fasterxml.jackson.core:jackson-core:jar:2.22.2:compile` +* #135: Fixed vulnerability CVE-2026-89425 in dependency `com.fasterxml.jackson.core:jackson-core:jar:2.22.2:compile` +* #137: Fixed vulnerability CVE-2026-110257 in dependency `org.ow2.asm:asm:jar:9.9.1:provided` +* #138: Fixed vulnerability CVE-2026-110258 in dependency `org.ow2.asm:asm:jar:9.9.1:provided` +* #139: Fixed vulnerability CVE-2026-110259 in dependency `org.ow2.asm:asm:jar:9.9.1:provided` +* #140: Fixed vulnerability CVE-2026-110260 in dependency `org.ow2.asm:asm:jar:9.9.1:provided` +* #141: Fixed vulnerability CVE-2026-110261 in dependency `org.ow2.asm:asm:jar:9.9.1:provided` +* #142: Fixed vulnerability CVE-2026-110263 in dependency `org.ow2.asm:asm:jar:9.9.1:provided` + +## Dependency Updates + +### Compile Dependency Updates + +* Updated `com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.22.2` to `2.22.4` +* Updated `com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.22.2` to `2.22.4` + +### Plugin Dependency Updates + +* Updated `com.exasol:error-code-crawler-maven-plugin:2.1.2` to `2.1.3` +* Updated `com.exasol:project-keeper-maven-plugin:5.7.5` to `5.8.0` +* Updated `org.apache.maven.plugins:maven-artifact-plugin:3.6.1` to `3.7.0` +* Updated `org.apache.maven.plugins:maven-compiler-plugin:3.15.0` to `3.16.0` +* Updated `org.apache.maven.plugins:maven-deploy-plugin:3.1.4` to `3.2.0` +* Updated `org.apache.maven.plugins:maven-failsafe-plugin:3.5.6` to `3.6.0` +* Updated `org.apache.maven.plugins:maven-install-plugin:3.1.4` to `3.2.0` +* Updated `org.apache.maven.plugins:maven-plugin-plugin:3.15.2` to `3.16.0` +* Updated `org.apache.maven.plugins:maven-surefire-plugin:3.5.6` to `3.6.0` +* Updated `org.codehaus.mojo:build-helper-maven-plugin:3.6.1` to `3.6.2` +* Updated `org.codehaus.mojo:versions-maven-plugin:2.21.0` to `2.23.0` +* Updated `org.itsallcode:openfasttrace-maven-plugin:2.3.1` to `3.1.0` +* Updated `org.sonarsource.scanner.maven:sonar-maven-plugin:5.7.0.6970` to `5.8.0.7211` +* Updated `org.sonatype.central:central-publishing-maven-plugin:0.11.0` to `0.12.0` diff --git a/mvnw b/mvnw new file mode 100755 index 0000000..bd8896b --- /dev/null +++ b/mvnw @@ -0,0 +1,295 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# 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 +# +# 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. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.4 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +scriptDir="$(dirname "$0")" +scriptName="$(basename "$0")" + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"$scriptDir/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${scriptName#mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c - >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +actualDistributionDir="" + +# First try the expected directory name (for regular distributions) +if [ -d "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" ]; then + if [ -f "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/bin/$MVN_CMD" ]; then + actualDistributionDir="$distributionUrlNameMain" + fi +fi + +# If not found, search for any directory with the Maven executable (for snapshots) +if [ -z "$actualDistributionDir" ]; then + # enable globbing to iterate over items + set +f + for dir in "$TMP_DOWNLOAD_DIR"/*; do + if [ -d "$dir" ]; then + if [ -f "$dir/bin/$MVN_CMD" ]; then + actualDistributionDir="$(basename "$dir")" + break + fi + fi + done + set -f +fi + +if [ -z "$actualDistributionDir" ]; then + verbose "Contents of $TMP_DOWNLOAD_DIR:" + verbose "$(ls -la "$TMP_DOWNLOAD_DIR")" + die "Could not find Maven distribution directory in extracted archive" +fi + +verbose "Found extracted Maven distribution directory: $actualDistributionDir" +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$actualDistributionDir/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$actualDistributionDir" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 0000000..92450f9 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,189 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@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 +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.4 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" ("%__MVNW_CMD__%" %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND -eq $False) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace "^.*$MVNW_REPO_PATTERN",'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' + +$MAVEN_M2_PATH = "$HOME/.m2" +if ($env:MAVEN_USER_HOME) { + $MAVEN_M2_PATH = "$env:MAVEN_USER_HOME" +} + +if (-not (Test-Path -Path $MAVEN_M2_PATH)) { + New-Item -Path $MAVEN_M2_PATH -ItemType Directory | Out-Null +} + +$MAVEN_WRAPPER_DISTS = $null +if ((Get-Item $MAVEN_M2_PATH).Target[0] -eq $null) { + $MAVEN_WRAPPER_DISTS = "$MAVEN_M2_PATH/wrapper/dists" +} else { + $MAVEN_WRAPPER_DISTS = (Get-Item $MAVEN_M2_PATH).Target[0] + "/wrapper/dists" +} + +$MAVEN_HOME_PARENT = "$MAVEN_WRAPPER_DISTS/$distributionUrlNameMain" +$MAVEN_HOME_NAME = ([System.Security.Cryptography.SHA256]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null + +# Find the actual extracted directory name (handles snapshots where filename != directory name) +$actualDistributionDir = "" + +# First try the expected directory name (for regular distributions) +$expectedPath = Join-Path "$TMP_DOWNLOAD_DIR" "$distributionUrlNameMain" +$expectedMvnPath = Join-Path "$expectedPath" "bin/$MVN_CMD" +if ((Test-Path -Path $expectedPath -PathType Container) -and (Test-Path -Path $expectedMvnPath -PathType Leaf)) { + $actualDistributionDir = $distributionUrlNameMain +} + +# If not found, search for any directory with the Maven executable (for snapshots) +if (!$actualDistributionDir) { + Get-ChildItem -Path "$TMP_DOWNLOAD_DIR" -Directory | ForEach-Object { + $testPath = Join-Path $_.FullName "bin/$MVN_CMD" + if (Test-Path -Path $testPath -PathType Leaf) { + $actualDistributionDir = $_.Name + } + } +} + +if (!$actualDistributionDir) { + Write-Error "Could not find Maven distribution directory in extracted archive" +} + +Write-Verbose "Found extracted Maven distribution directory: $actualDistributionDir" +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$actualDistributionDir" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/pk_generated_parent.pom b/pk_generated_parent.pom index 843136b..d0c32c1 100644 --- a/pk_generated_parent.pom +++ b/pk_generated_parent.pom @@ -3,7 +3,7 @@ 4.0.0 com.exasol error-code-crawler-maven-plugin-generated-parent - 2.1.2 + 2.1.3 pom UTF-8 @@ -60,7 +60,7 @@ org.apache.maven.plugins maven-install-plugin - 3.1.4 + 3.2.0 org.apache.maven.plugins @@ -75,7 +75,7 @@ org.codehaus.mojo exec-maven-plugin - 3.6.3 + 3.6.4 true @@ -88,7 +88,7 @@ org.sonarsource.scanner.maven sonar-maven-plugin - 5.7.0.6970 + 5.8.0.7211 org.apache.maven.plugins @@ -112,7 +112,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.15.0 + 3.16.0 ${java.version} true @@ -135,9 +135,10 @@ - 3.8.7 + 3.10.0 + 17 @@ -192,7 +193,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.5.6 + 3.6.0 ${argLine} @@ -208,7 +209,7 @@ org.codehaus.mojo versions-maven-plugin - 2.21.0 + 2.23.0 display-updates @@ -263,7 +264,7 @@ org.apache.maven.plugins maven-artifact-plugin - 3.6.1 + 3.7.0 check-build-plan @@ -277,7 +278,7 @@ org.apache.maven.plugins maven-deploy-plugin - 3.1.4 + 3.2.0 true @@ -352,7 +353,7 @@ org.codehaus.mojo build-helper-maven-plugin - 3.6.1 + 3.6.2 attach-spdx-sbom @@ -384,6 +385,7 @@ sign + true --pinentry-mode loopback @@ -395,7 +397,7 @@ org.sonatype.central central-publishing-maven-plugin - 0.11.0 + 0.12.0 true maven-central-portal @@ -429,7 +431,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.5.6 + 3.6.0 ${argLine} @@ -502,7 +504,7 @@ com.exasol error-code-crawler-maven-plugin - 2.1.1 + 2.1.2 verify diff --git a/pom.xml b/pom.xml index 83f8ed3..b0026a1 100644 --- a/pom.xml +++ b/pom.xml @@ -3,13 +3,13 @@ 4.0.0 error-code-crawler-maven-plugin error-code-crawler-maven-plugin - 2.1.2 + 2.1.3 Crawler for Exasol error codes. https://github.com/exasol/error-code-crawler-maven-plugin/ maven-plugin 17 - 3.9.16 + 3.10.0 @@ -17,10 +17,16 @@ com.fasterxml.jackson jackson-bom - 2.22.2 + 2.22.4 pom import + + + org.ow2.asm + asm + 9.11.1 + @@ -135,12 +141,12 @@ org.apache.maven.plugins maven-plugin-plugin - 3.15.2 + 3.16.0 com.exasol project-keeper-maven-plugin - 5.7.5 + 5.8.0 @@ -169,7 +175,7 @@ org.itsallcode openfasttrace-maven-plugin - 2.3.1 + 3.1.0 trace-requirements @@ -199,7 +205,7 @@ error-code-crawler-maven-plugin-generated-parent com.exasol - 2.1.2 + 2.1.3 pk_generated_parent.pom diff --git a/src/test/java/com/exasol/errorcodecrawlermavenplugin/ErrorCodeCrawlerMojoIT.java b/src/test/java/com/exasol/errorcodecrawlermavenplugin/ErrorCodeCrawlerMojoIT.java index e7a271f..ecd8483 100644 --- a/src/test/java/com/exasol/errorcodecrawlermavenplugin/ErrorCodeCrawlerMojoIT.java +++ b/src/test/java/com/exasol/errorcodecrawlermavenplugin/ErrorCodeCrawlerMojoIT.java @@ -165,7 +165,6 @@ void testCrawlingWithJava21Source() throws VerificationException, IOException { } @Test - @Disabled("Java 25 not yet supported, see https://github.com/exasol/error-code-crawler-maven-plugin/issues/117") void testCrawlingWithJava25Source() throws VerificationException, IOException { getVerifier() .withPom(TestMavenModel.create(ErrorCodeCrawlerPluginTestConfig.builder().compilerRelease(25).build())) diff --git a/src/test/resources/java25/Java25.java b/src/test/resources/java25/Java25.java index 2d5cf69..06b7d74 100644 --- a/src/test/resources/java25/Java25.java +++ b/src/test/resources/java25/Java25.java @@ -2,19 +2,39 @@ public class Java25 { - String describe(final long input) { - if (input instanceof final int narrowed) { - return "fits into int: " + narrowed; + record Point(int x, int y) { + } + + boolean isNumberWithUnnamedCatchParameter(final String value) { + try { + Integer.parseInt(value); + return true; + } catch (final NumberFormatException _) { + return false; + } + } + + int xCoordinateWithUnnamedPatternInInstanceof(final Object object) { + if (object instanceof Point(final int x, _)) { + return x; } - return "does not fit into int: " + input; + return 0; } - String classify(final double value) { - return switch (value) { - case final double d when Double.isNaN(d) -> "not a number"; - case final double d when d == 0.0d -> "zero"; // catches +0.0 and -0.0 - case final double d when d > 0 -> "positive"; - default -> "negative"; - }; + static class Base { + private final String name; + + Base(final String name) { + this.name = name; + } + } + + static class ValidatingArgumentBeforeSuperConstructorCall extends Base { + ValidatingArgumentBeforeSuperConstructorCall(final String name) { + if (name.isBlank()) { + throw new IllegalArgumentException("name must not be blank"); + } + super(name); + } } }