diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c3e81be..7cae8771 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -128,8 +128,8 @@ jobs: distribution: temurin java-version: 17 server-id: ossindex - server-username: OSSINDEX_USERNAME - server-password: OSSINDEX_TOKEN + server-username-env-var: OSSINDEX_USERNAME + server-password-env-var: OSSINDEX_TOKEN - name: Ossindex run: | mvn -T 1C --errors --batch-mode test-compile \ @@ -139,12 +139,89 @@ jobs: OSSINDEX_USERNAME: ${{ secrets.OSSINDEX_USERNAME }} OSSINDEX_TOKEN: ${{ secrets.OSSINDEX_TOKEN }} + native-image: + # [bld->dsn~cli.native-executable~1] + # [bld->dsn~cli.native-executable.support-built-in-plugins~1] + permissions: + contents: read + strategy: + fail-fast: false + matrix: + include: + - target: linux-x64 + runner: ubuntu-26.04 + output: openfasttrace-linux-x64 + - target: linux-arm64 + runner: ubuntu-26.04-arm + output: openfasttrace-linux-arm64 + - target: macos-arm64 + runner: macos-26 + output: openfasttrace-macos-arm64 + - target: windows-x64 + runner: windows-2025 + output: openfasttrace-windows-x64 + runs-on: ${{ matrix.runner }} + defaults: + run: + shell: bash + name: Native image ${{ matrix.target }} + concurrency: + group: ${{ github.workflow }}-native-${{ github.ref }}-${{ matrix.target }} + cancel-in-progress: true + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + + - uses: graalvm/setup-graalvm@60e76998d25690099182b796e99b8804da582d90 # v1.6.10 + name: Set up GraalVM 25 + with: + version: '25.6' + distribution: graalvm + github-token: ${{ secrets.GITHUB_TOKEN }} + cache: maven + + - name: Configure GraalVM 25 Maven toolchain + run: | + mkdir -p "$HOME/.m2" + cat > "$HOME/.m2/toolchains.xml" < + + jdk + + 25 + + + ${JAVA_HOME} + + + + EOF + + - name: Build and test native image with Maven + run: >- + mvn --batch-mode -T 1C -Pnative-image -pl native-image -am verify + -Dossindex.skip=true + -Djava.version=25 + -Dnative.image.name=${{ matrix.output }} + + - name: Upload native image + uses: actions/upload-artifact@v7 + with: + name: openfasttrace-native-${{ matrix.target }} + path: native-image/target/${{ matrix.output }}* + if-no-files-found: error + build: permissions: contents: read needs: - matrix-build - ossindex + - native-image runs-on: ubuntu-slim steps: - run: echo "Build successful" diff --git a/.github/workflows/github_release.sh b/.github/workflows/github_release.sh index 3a700c07..81496107 100755 --- a/.github/workflows/github_release.sh +++ b/.github/workflows/github_release.sh @@ -29,6 +29,19 @@ readonly artifact_checksum_path="${artifact_path}.sha256" calculate_checksum "$sbom_path" readonly sbom_checksum_path="${sbom_path}.sha256" +shopt -s nullglob +native_assets=("$base_dir"/native-image/target/openfasttrace-*) +# Expect binaries for Linux x86 + ARM, macOS ARM, Windows x86 +if [[ "${#native_assets[@]}" -ne 4 ]]; then + echo "Expected 4 native images in native-image/target, found ${#native_assets[@]}" >&2 + exit 1 +fi +native_release_assets=() +for native_asset in "${native_assets[@]}"; do + calculate_checksum "$native_asset" + native_release_assets+=("$native_asset" "${native_asset}.sha256") +done + # Create GitHub release readonly changes_file="$base_dir/doc/changes/changes_${project_version}.md" @@ -45,8 +58,10 @@ echo "Artifact file: $artifact_path" echo "Artifact checksum: $artifact_checksum_path" echo "SBOM file : $sbom_path" echo "SBOM checksum: $sbom_checksum_path" +printf 'Native asset : %s\n' "${native_assets[@]}" release_url=$(gh release create --latest --title "$title" --notes "$notes" --target main "$tag" \ - "$artifact_path" "$artifact_checksum_path" "$sbom_path" "$sbom_checksum_path") + "$artifact_path" "$artifact_checksum_path" "$sbom_path" "$sbom_checksum_path" \ + "${native_release_assets[@]}") readonly release_url echo "Release URL: $release_url" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index efd32129..c354a870 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,95 @@ on: default: true jobs: + validate-release-preconditions: + runs-on: ubuntu-slim + permissions: + contents: read + steps: + - name: Fail if not running on main branch + if: ${{ github.ref != 'refs/heads/main' }} + run: | + echo "Not running on main branch, github.ref is ${GITHUB_REF}. Please start this workflow only on main." + exit 1 + env: + GITHUB_REF: ${{ github.ref }} + + native-images: + needs: validate-release-preconditions + permissions: + contents: read + strategy: + fail-fast: false + matrix: + include: + - target: linux-x64 + runner: ubuntu-26.04 + output: openfasttrace-linux-x64 + - target: linux-arm64 + runner: ubuntu-26.04-arm + output: openfasttrace-linux-arm64 + - target: macos-arm64 + runner: macos-26 + output: openfasttrace-macos-arm64 + - target: windows-x64 + runner: windows-2025 + output: openfasttrace-windows-x64 + runs-on: ${{ matrix.runner }} + defaults: + run: + shell: bash + name: Native image ${{ matrix.target }} + steps: + - uses: actions/checkout@v7 + with: + fetch-depth: 0 + persist-credentials: false + + - uses: graalvm/setup-graalvm@60e76998d25690099182b796e99b8804da582d90 # v1.6.10 + name: Set up GraalVM 25 + with: + version: '25.6' + distribution: graalvm + github-token: ${{ secrets.GITHUB_TOKEN }} + cache: maven + + - name: Configure GraalVM 25 Maven toolchain + run: | + mkdir -p "$HOME/.m2" + cat > "$HOME/.m2/toolchains.xml" < + + jdk + + 25 + + + ${JAVA_HOME} + + + + EOF + + - name: Build and test native image with Maven + run: >- + mvn --batch-mode -T 1C -Pnative-image -pl native-image -am verify + -Dossindex.skip=true + -Djava.version=25 + -Dnative.image.name=${{ matrix.output }} + + - name: Upload native image + uses: actions/upload-artifact@v7 + with: + name: openfasttrace-native-${{ matrix.target }} + path: native-image/target/${{ matrix.output }}* + if-no-files-found: error + release: + needs: + - validate-release-preconditions + - native-images runs-on: ubuntu-latest defaults: run: @@ -46,14 +134,21 @@ jobs: java-version: 17 cache: "maven" server-id: central - 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 - name: Build run: mvn --batch-mode -T 1C clean install -Dossindex.skip=true + - name: Download native images + uses: actions/download-artifact@v7 + with: + pattern: openfasttrace-native-* + path: native-image/target + merge-multiple: true + - name: List secret GPG keys run: gpg --list-secret-keys diff --git a/doc/changes/changes_4.12.0.md b/doc/changes/changes_4.12.0.md index c203f7b2..1be6217e 100644 --- a/doc/changes/changes_4.12.0.md +++ b/doc/changes/changes_4.12.0.md @@ -1,4 +1,4 @@ -# OpenFastTrace 4.12.0, released 2026-10-?? +# OpenFastTrace 4.12.0, released 2026-11-26 Code name: Syntax usability and JSX and TSX tag importer @@ -12,3 +12,4 @@ The source tag importer now supports JSX (`.jsx`) and TSX (`.tsx`) source files, * #638: Allow hash mark in addition to tilde as revision separator * #647: Add support for JSX and TSX in the source tag importer +* #561: Build and publish native binaries for Linux (x64 and arm64), Windows (x64) and macOS (arm64) diff --git a/doc/developer_guide/developer_guide.md b/doc/developer_guide/developer_guide.md index 24339e80..6a98d0a4 100644 --- a/doc/developer_guide/developer_guide.md +++ b/doc/developer_guide/developer_guide.md @@ -155,6 +155,20 @@ Specify test class via system property `it.test` and module via command line opt mvn -Dit.test=CliStarterIT failsafe:integration-test -projects product ``` +### Build and Test a Native Executable + +Native builds use GraalVM Native Image 25. Set `GRAALVM_HOME` to a GraalVM 25 installation that includes `native-image`: + +```sh +export GRAALVM_HOME=/path/to/graalvm-jdk-25 +export PATH="$GRAALVM_HOME/bin:$PATH" +mvn --batch-mode -T 1C -Pnative-image -pl native-image -am verify +``` + +The Maven build selects the `native-image` module and builds the executable in `native-image/target/openfasttrace`, then runs JUnit smoke tests against it. To set a platform-specific name, pass `-Dnative.image.name=openfasttrace-linux-x64` to the command. + +Build and test on the target operating system and architecture. Native executables include plugins from the main OpenFastTrace project. + ### Check for Dependency Updates ```sh @@ -365,9 +379,9 @@ Legend: ### Why Two Parent POMs? -As you can see in the table above, not all modules are intended to be deployed on Maven Central. The distinction is made by using two parent POMs. +As you can see in the table above, not all modules are intended to be deployed on Maven Central. The distinction is made by using two parent POMs. -The base POM is `openfasttrace-parent`, it mainly contains common dependencies and build configuration. On top of that, `openfasttrace-mc-deployable-parent` adds signing and Maven central deployment. +The base POM is `openfasttrace-parent`, it mainly contains common dependencies and build configuration. On top of that, `openfasttrace-mc-deployable-parent` adds signing and Maven central deployment. This structure ensures that only user-facing components are published to Maven Central while keeping internal development tools and build infrastructure private. @@ -387,7 +401,7 @@ Ensure that neither `testutil` nor any parent module is included. ### Verify Deployment Preconditions -Configure Maven Central credentials in `~/.m2/settings.xml`: +Configure Maven Central credentials in `~/.m2/settings.xml`: ```xml diff --git a/doc/spec/design.md b/doc/spec/design.md index 1d12466f..0703fb9a 100644 --- a/doc/spec/design.md +++ b/doc/spec/design.md @@ -1472,6 +1472,30 @@ Covers: Needs: impl +### Native Command Line Executables +`dsn~cli.native-executable~1` + +The `native-image` Maven module builds native command line executables from the product JAR using the GraalVM Native Build Tools Maven plugin. The `native-image` Maven profile enables native compilation and smoke tests. Each executable is built and tested on a runner matching its target operating system and architecture. Native Image reachability metadata preserves the CLI's reflective argument setters. + +Native executables support built-in providers only. + +Covers: + +* [`req~cli.native-executable~1`](system_requirements.md#native-command-line-executables) + +Needs: itest, bld + +#### Native Binaries Include Plugins +`dsn~cli.native-executable.support-built-in-plugins~1` + +Native Binaries preserves the service-provider metadata to support all built-in importers, exporters, and reporters. + +Covers: + +* [`req~cli.native-executable~1`](system_requirements.md#native-command-line-executables) + +Needs: itest, bld + # Quality Requirements See [Quality Requirements](design/quality_requirements.md). @@ -1523,6 +1547,19 @@ Authors of importers need to be able to rely on these cleanups being done centra Cleanup in every importer individually. That was the case up to and including OFT 3.7.1, which turned out to make the importer more complex than necessary. +## Should Native Binaries Load Plugins at Runtime? +`dsn~cli.native-executable.does-not-support-loading-plugins-at-runtime~1` + +OFT allows loading third party plugins from JAR files in `~/.oft/plugins`. + +### Decision + +No. This would require a separate JVM or native plugins. This is out-of-scope for now. + +Comment: + +This is a negative requirement that does not need to be tested and we terminate it here. + # Bibliography The following documents or are referenced in this specification. diff --git a/doc/spec/system_requirements.md b/doc/spec/system_requirements.md index b7217cc8..55e5b637 100644 --- a/doc/spec/system_requirements.md +++ b/doc/spec/system_requirements.md @@ -1135,6 +1135,17 @@ Covers: Needs: dsn +#### Native Command Line Executables +`req~cli.native-executable~1` + +OpenFastTrace provides native command line executables for supported Linux, macOS, and Windows architectures. The native executables include all built-in importers, exporters, and reporters. + +Covers: + +* [feat~command-line-interface~1](#command-line-interface) + +Needs: dsn + ### Third Party Plugins #### Loading Plugins diff --git a/doc/user_guide/installation/linux.md b/doc/user_guide/installation/linux.md index 88cf8a1c..532e8aa5 100644 --- a/doc/user_guide/installation/linux.md +++ b/doc/user_guide/installation/linux.md @@ -10,6 +10,17 @@ nav_order: 1 There are several ways to install OpenFastTrace on Linux, depending on your distribution and preference. +### Native Executable + +Download `openfasttrace-linux-x64` or `openfasttrace-linux-arm64` from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. The native executable does not require Java. Make it executable and run it: + +```bash +chmod +x openfasttrace-linux-x64 +./openfasttrace-linux-x64 --help +``` + +Use the executable JAR below when you need third-party Java plugin JARs. + ### Package Manager (APT - Debian, Ubuntu, etc.) For Debian-based systems, we provide an APT repository. This is the recommended way to keep OFT up to date. diff --git a/doc/user_guide/installation/macos.md b/doc/user_guide/installation/macos.md index 7cb9a939..ed4c5623 100644 --- a/doc/user_guide/installation/macos.md +++ b/doc/user_guide/installation/macos.md @@ -10,6 +10,17 @@ nav_order: 2 OpenFastTrace can be installed on macOS using Homebrew, JBang or manually via a JAR file. +### Native Executable + +Download the matching executable, `openfasttrace-macos-arm64` for Apple Silicon from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page. The native executable does not require Java. Run it from Terminal: + +```bash +chmod +x openfasttrace-macos-arm64 +./openfasttrace-macos-arm64 --help +``` + +Use the executable JAR below when you need third-party Java plugin JARs. + ### Homebrew If you use Homebrew, you can install OpenFastTrace directly: diff --git a/doc/user_guide/installation/windows.md b/doc/user_guide/installation/windows.md index 4e57cde6..cf968f90 100644 --- a/doc/user_guide/installation/windows.md +++ b/doc/user_guide/installation/windows.md @@ -10,6 +10,16 @@ nav_order: 3 On Windows, OpenFastTrace can be run via JBang or manually via the JAR file. +### Native Executable + +Download `openfasttrace-windows-x64.exe` from the [GitHub Releases](https://github.com/itsallcode/openfasttrace/releases) page and run it from PowerShell: + +```powershell +.\openfasttrace-windows-x64.exe --help +``` + +The native executable does not require Java. Use the executable JAR below when you need third-party Java plugin JARs. + ### JBang [JBang](https://www.jbang.dev/) runs OpenFastTrace straight from Maven Central and downloads a suitable Java runtime if none is installed. diff --git a/doc/user_guide/tool_support/tools_for_authoring_oft_documents.md b/doc/user_guide/tool_support/tools_for_authoring_oft_documents.md index 9d3dd55b..5c12e948 100644 --- a/doc/user_guide/tool_support/tools_for_authoring_oft_documents.md +++ b/doc/user_guide/tool_support/tools_for_authoring_oft_documents.md @@ -39,12 +39,10 @@ Features include: #### Third-Party Plugins -Check out the [OpenFastTrace Language Server](https://github.com/fgorke/openfasttrace-language-server) written by [@fgorke](https://github.com/fgorke). - -A big thank-you to [@fgorke](https://github.com/fgorke) for developing the OpenFastTrace Language Server! +Check out the [OpenFastTrace Language Server](https://github.com/itsallcode/openfasttrace-language-server). A big thank-you to [@fgorke](https://github.com/fgorke) for developing the OpenFastTrace Language Server! Unlike a specific plugin for a single IDE, language servers provide a standardized way to integrate language features across different IDEs (e.g., VS Code or the JetBrains IDEs). -* [User Guide](https://github.com/fgorke/openfasttrace-language-server/blob/main/doc/user-guide/README.md) -* [Demo](https://github.com/fgorke/openfasttrace-language-server/blob/main/doc/demo/README.md) -* [Releases](https://github.com/fgorke/openfasttrace-language-server/releases) +* [User Guide](https://github.com/itsallcode/openfasttrace-language-server/blob/main/doc/user-guide/README.md) +* [Demo](https://github.com/itsallcode/openfasttrace-language-server/blob/main/doc/demo/README.md) +* [Releases](https://github.com/itsallcode/openfasttrace-language-server/releases) diff --git a/native-image/.settings/org.eclipse.jdt.core.prefs b/native-image/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..3d2285dd --- /dev/null +++ b/native-image/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,537 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.annotation.inheritNullAnnotations=disabled +org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore +org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull +org.eclipse.jdt.core.compiler.annotation.nonnull.secondary= +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault +org.eclipse.jdt.core.compiler.annotation.nonnullbydefault.secondary= +org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable +org.eclipse.jdt.core.compiler.annotation.nullable.secondary= +org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.doc.comment.support=enabled +org.eclipse.jdt.core.compiler.problem.APILeak=warning +org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.autoboxing=ignore +org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning +org.eclipse.jdt.core.compiler.problem.deadCode=warning +org.eclipse.jdt.core.compiler.problem.deprecation=warning +org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled +org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled +org.eclipse.jdt.core.compiler.problem.discouragedReference=warning +org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore +org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore +org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled +org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore +org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning +org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning +org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled +org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning +org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning +org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore +org.eclipse.jdt.core.compiler.problem.invalidJavadoc=warning +org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled +org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore +org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning +org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore +org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled +org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore +org.eclipse.jdt.core.compiler.problem.missingJavadocComments=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags +org.eclipse.jdt.core.compiler.problem.missingJavadocTags=warning +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled +org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore +org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled +org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning +org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore +org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning +org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning +org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore +org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning +org.eclipse.jdt.core.compiler.problem.nonnullTypeVariableFromLegacyInvocation=warning +org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error +org.eclipse.jdt.core.compiler.problem.nullReference=warning +org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error +org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning +org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning +org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore +org.eclipse.jdt.core.compiler.problem.pessimisticNullAnalysisForFreeTypeVariables=warning +org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore +org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore +org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore +org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning +org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning +org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore +org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore +org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore +org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled +org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning +org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled +org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled +org.eclipse.jdt.core.compiler.problem.syntacticNullAnalysisForFields=disabled +org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore +org.eclipse.jdt.core.compiler.problem.terminalDeprecation=warning +org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning +org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled +org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning +org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning +org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore +org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=ignore +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentType=warning +org.eclipse.jdt.core.compiler.problem.unlikelyCollectionMethodArgumentTypeStrict=disabled +org.eclipse.jdt.core.compiler.problem.unlikelyEqualsArgumentType=info +org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore +org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore +org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore +org.eclipse.jdt.core.compiler.problem.unstableAutoModuleName=warning +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled +org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedImport=warning +org.eclipse.jdt.core.compiler.problem.unusedLabel=warning +org.eclipse.jdt.core.compiler.problem.unusedLocal=warning +org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled +org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled +org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning +org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore +org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning +org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning +org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 +org.eclipse.jdt.core.formatter.align_arrows_in_switch_on_columns=false +org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false +org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647 +org.eclipse.jdt.core.formatter.align_selector_in_method_invocation_on_expression_first_line=false +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.align_variable_declarations_on_columns=false +org.eclipse.jdt.core.formatter.align_with_spaces=false +org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_enum_constant=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_field=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_local_variable=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_method=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_package=49 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_parameter=0 +org.eclipse.jdt.core.formatter.alignment_for_annotations_on_type=49 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_assertion_message=0 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_bitwise_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_loops=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression_chain=0 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_for_loop_header=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_switch_case_with_colon=0 +org.eclipse.jdt.core.formatter.alignment_for_logical_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0 +org.eclipse.jdt.core.formatter.alignment_for_module_statements=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_multiplicative_operator=16 +org.eclipse.jdt.core.formatter.alignment_for_parameterized_type_references=0 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_permitted_types_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_record_components=16 +org.eclipse.jdt.core.formatter.alignment_for_relational_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 +org.eclipse.jdt.core.formatter.alignment_for_shift_operator=0 +org.eclipse.jdt.core.formatter.alignment_for_string_concatenation=16 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_record_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_switch_case_with_arrow=0 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_type_annotations=0 +org.eclipse.jdt.core.formatter.alignment_for_type_arguments=0 +org.eclipse.jdt.core.formatter.alignment_for_type_parameters=0 +org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_last_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_abstract_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_statement_group_in_switch=0 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=next_line_on_wrap +org.eclipse.jdt.core.formatter.brace_position_for_block=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=next_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case_after_arrow=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=next_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_constructor=next_line +org.eclipse.jdt.core.formatter.brace_position_for_record_declaration=next_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=next_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line +org.eclipse.jdt.core.formatter.comment.align_tags_descriptions_grouped=false +org.eclipse.jdt.core.formatter.comment.align_tags_names_descriptions=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.count_line_length_from_starting_position=true +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_markdown_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.indent_tag_description=false +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_between_different_tags=do not insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.javadoc_do_not_separate_block_tags=false +org.eclipse.jdt.core.formatter.comment.line_length=120 +org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true +org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true +org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off +org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_record_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert +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 +org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_permitted_types=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_record_components=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_switch_case_expressions=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_after_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_not_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert +org.eclipse.jdt.core.formatter.insert_space_after_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_additive_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_case=insert +org.eclipse.jdt.core.formatter.insert_space_before_arrow_in_switch_default=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_bitwise_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_permitted_types=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_record_components=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_switch_case_expressions=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert +org.eclipse.jdt.core.formatter.insert_space_before_logical_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_multiplicative_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_constructor=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_record_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_record_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_relational_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_shift_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_string_concatenation=insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.join_line_comments=false +org.eclipse.jdt.core.formatter.join_lines_in_comments=false +org.eclipse.jdt.core.formatter.join_wrapped_lines=false +org.eclipse.jdt.core.formatter.keep_annotation_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_anonymous_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_code_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=true +org.eclipse.jdt.core.formatter.keep_enum_constant_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_enum_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_if_then_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_lambda_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_loop_body_block_on_one_line=one_line_if_empty +org.eclipse.jdt.core.formatter.keep_method_body_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_constructor_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_record_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_simple_do_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_for_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_simple_getter_setter_on_one_line=false +org.eclipse.jdt.core.formatter.keep_simple_while_body_on_same_line=false +org.eclipse.jdt.core.formatter.keep_switch_body_block_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_switch_case_with_arrow_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_type_declaration_on_one_line=one_line_never +org.eclipse.jdt.core.formatter.lineSplit=120 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_after_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_code_block=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_end_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_blank_lines_before_code_block=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.parentheses_positions_in_annotation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_catch_clause=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_enum_constant_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_for_statment=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_if_while_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_lambda_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_delcaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_method_invocation=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_record_declaration=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_switch_statement=common_lines +org.eclipse.jdt.core.formatter.parentheses_positions_in_try_clause=common_lines +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +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=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 +org.eclipse.jdt.core.formatter.wrap_before_assignment_operator=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true +org.eclipse.jdt.core.formatter.wrap_before_bitwise_operator=true +org.eclipse.jdt.core.formatter.wrap_before_conditional_operator=true +org.eclipse.jdt.core.formatter.wrap_before_logical_operator=true +org.eclipse.jdt.core.formatter.wrap_before_multiplicative_operator=true +org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true +org.eclipse.jdt.core.formatter.wrap_before_relational_operator=true +org.eclipse.jdt.core.formatter.wrap_before_shift_operator=true +org.eclipse.jdt.core.formatter.wrap_before_string_concatenation=true +org.eclipse.jdt.core.formatter.wrap_before_switch_case_arrow_operator=false +org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true +org.eclipse.jdt.core.javaFormatter=org.eclipse.jdt.core.defaultJavaFormatter diff --git a/native-image/.settings/org.eclipse.jdt.ui.prefs b/native-image/.settings/org.eclipse.jdt.ui.prefs new file mode 100644 index 00000000..cd7ee8e5 --- /dev/null +++ b/native-image/.settings/org.eclipse.jdt.ui.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +formatter_profile=_itsallcode style +formatter_settings_version=23 +org.eclipse.jdt.ui.ignorelowercasenames=true +org.eclipse.jdt.ui.importorder=java;javax;org;com; +org.eclipse.jdt.ui.ondemandthreshold=4 +org.eclipse.jdt.ui.staticondemandthreshold=4 diff --git a/native-image/pom.xml b/native-image/pom.xml new file mode 100644 index 00000000..10f84ede --- /dev/null +++ b/native-image/pom.xml @@ -0,0 +1,132 @@ + + 4.0.0 + openfasttrace-native-image + OpenFastTrace Native Image + jar + + ../parent/pom.xml + org.itsallcode.openfasttrace + openfasttrace-parent + ${revision} + + + openfasttrace + -H:-AddAllCharsets + + + + org.itsallcode.openfasttrace + openfasttrace + ${revision} + + + + org.itsallcode.openfasttrace + * + + + + + org.itsallcode + simple-process + test + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + -Xlint:all + + -Xlint:-path + -Werror + + + + + org.apache.maven.plugins + maven-failsafe-plugin + + true + + ${project.build.directory}/${native.image.name} + + + + + + + + native-image + + + + org.apache.maven.plugins + maven-failsafe-plugin + + false + + + + org.graalvm.buildtools + native-maven-plugin + 1.1.19 + + + build-native-image + package + + compile-no-fork + + + + + org.itsallcode.openfasttrace.core.cli.CliStarter + ${native.image.name} + false + + + --future-defaults=all + + -O2 + --gc=G1 + ${native.image.charset.option} + + + + + + + + native-image-windows-charsets + + + windows + + + + + -H:+AddAllCharsets + + + + + org.graalvm.buildtools + native-maven-plugin + + + + --native-compiler-options=/wd4815 + + + + + + + + diff --git a/native-image/src/main/resources/META-INF/native-image/org.itsallcode.openfasttrace/openfasttrace/reachability-metadata.json b/native-image/src/main/resources/META-INF/native-image/org.itsallcode.openfasttrace/openfasttrace/reachability-metadata.json new file mode 100644 index 00000000..61d04808 --- /dev/null +++ b/native-image/src/main/resources/META-INF/native-image/org.itsallcode.openfasttrace/openfasttrace/reachability-metadata.json @@ -0,0 +1,16 @@ +{ + "reflection": [ + { + "type": "org.itsallcode.openfasttrace.core.cli.CliArguments", + "allPublicMethods": true + } + ], + "resources": [ + { "glob": "usage.txt" }, + { "glob": "version.properties" }, + { "glob": "css/report.css" }, + { "glob": "META-INF/services/org.itsallcode.openfasttrace.api.importer.ImporterFactory" }, + { "glob": "META-INF/services/org.itsallcode.openfasttrace.api.exporter.ExporterFactory" }, + { "glob": "META-INF/services/org.itsallcode.openfasttrace.api.report.ReporterFactory" } + ] +} diff --git a/native-image/src/test/java/org/itsallcode/openfasttrace/nativeimage/NativeImageIT.java b/native-image/src/test/java/org/itsallcode/openfasttrace/nativeimage/NativeImageIT.java new file mode 100644 index 00000000..11cd66e2 --- /dev/null +++ b/native-image/src/test/java/org/itsallcode/openfasttrace/nativeimage/NativeImageIT.java @@ -0,0 +1,184 @@ +package org.itsallcode.openfasttrace.nativeimage; + +import static java.util.Objects.requireNonNull; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.hamcrest.Matchers.containsString; +import static org.hamcrest.Matchers.equalTo; +import static org.junit.jupiter.api.Assertions.assertAll; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Duration; +import java.util.ArrayList; +import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + +import org.itsallcode.process.SimpleProcess; +import org.itsallcode.process.SimpleProcessBuilder; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.io.TempDir; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.CsvSource; + +class NativeImageIT +{ + private static final String RESOURCE_DIRECTORY = "/native-image/"; + private static final Duration PROCESS_TIMEOUT = Duration.ofSeconds(60); + private static final String NATIVE_IMAGE_PATH_PROPERTY = "native.image.path"; + + @BeforeAll + static void requireNativeExecutable() + { + final Path executable = nativeExecutablePath(); + if (!Files.isRegularFile(executable)) + { + throw new AssertionError("Native executable not found at " + executable + + ". Build it with `mvn --batch-mode -T 1C -Pnative-image -pl native-image -am verify`."); + } + } + + // [itest->dsn~cli.native-executable~1] + @ParameterizedTest + @CsvSource( + { + "sample.md, req~native-image-markdown~1", + "sample.rst, req~native-image-rst~1", + "sample.oreqm, req~native-image-specobject~1", + "sample.feature, scn~native-image-gherkin~1", + "sample.java, impl~native-image-tag~1" }) + void testBuiltInImporterReadsItsFormat(final String fixtureName, final String expectedId, + @TempDir final Path temporaryDirectory) throws IOException + { + final Path fixture = copyFixture(fixtureName, temporaryDirectory); + final List additionalInputs = fixtureName.equals("sample.java") + ? List.of(copyFixture("sample-tag-requirement.md", temporaryDirectory).toString()) + : List.of(); + final List arguments = new ArrayList<>(List.of("trace", "--report-verbosity", "all", + fixture.toString())); + arguments.addAll(additionalInputs); + + final String output = runNativeImage(arguments.toArray(String[]::new)); + + assertThat("imported item", output, containsString(expectedId)); + } + + // [itest->dsn~cli.native-executable~1] + @Test + void testBuiltInZipImporterReadsMarkdownEntry(@TempDir final Path temporaryDirectory) throws IOException + { + final Path markdown = copyFixture("sample.md", temporaryDirectory); + final Path archive = temporaryDirectory.resolve("sample.zip"); + createZipArchive(markdown, archive); + + final String output = runNativeImage("trace", "--report-verbosity", "all", archive.toString()); + + assertThat("item imported from archive", output, containsString("req~native-image-markdown~1")); + } + + // [itest->dsn~cli.native-executable.support-built-in-plugins~1] + @Test + void testBuiltInPlainReporterProducesItsOutput(@TempDir final Path temporaryDirectory) throws IOException + { + final String output = runReporter(temporaryDirectory, "plain"); + assertThat("report contains imported item", output, containsString("native-image-markdown")); + } + + // [itest->dsn~cli.native-executable.support-built-in-plugins~1] + @Test + void testBuiltInHtmlReporterProducesItsOutput(@TempDir final Path temporaryDirectory) throws IOException + { + final String output = runReporter(temporaryDirectory, "html"); + assertAll( + () -> assertThat("HTML report contains imported item", output, containsString("native-image-markdown")), + () -> assertThat("HTML report", output, containsString(""))); + } + + // [itest->dsn~cli.native-executable.support-built-in-plugins~1] + @Test + void testBuiltInAspecReporterProducesItsOutput(@TempDir final Path temporaryDirectory) throws IOException + { + final String output = runReporter(temporaryDirectory, "aspec"); + assertAll( + () -> assertThat("SpecObject report contains imported item", output, + containsString("native-image-markdown")), + () -> assertThat("SpecObject report", output, containsString("dsn~cli.native-executable.support-built-in-plugins~1] + @Test + void testBuiltInSpecObjectExporterProducesDocument(@TempDir final Path temporaryDirectory) throws IOException + { + final Path fixture = copyFixture("sample.md", temporaryDirectory); + + final String output = runNativeImage("convert", "--output-format", "specobject", + fixture.toString()); + + assertThat("SpecObject output", output, containsString(" command = new ArrayList<>(); + command.add(executable.toAbsolutePath().toString()); + command.addAll(List.of(arguments)); + final SimpleProcess process = SimpleProcessBuilder.create() + .command(command) + .redirectErrorStream(true) + .start(); + process.waitForTermination(PROCESS_TIMEOUT); + final String output = process.getStdOut(); + assertThat("Native executable exited with code " + process.exitValue() + ". Output: " + output, + process.exitValue(), equalTo(0)); + return output; + } + + private static Path nativeExecutablePath() + { + final String configuredPath = System.getProperty(NATIVE_IMAGE_PATH_PROPERTY, "target/openfasttrace"); + final Path executable = Path.of(configuredPath); + if (isWindows() && !configuredPath.toLowerCase().endsWith(".exe")) + { + return Path.of(configuredPath + ".exe"); + } + return executable; + } + + private static boolean isWindows() + { + return System.getProperty("os.name", "").toLowerCase().contains("windows"); + } + + private static Path copyFixture(final String fixtureName, final Path targetDirectory) throws IOException + { + final Path target = targetDirectory.resolve(fixtureName); + try (final InputStream fixture = requireNonNull( + NativeImageIT.class.getResourceAsStream(RESOURCE_DIRECTORY + fixtureName))) + { + Files.copy(fixture, target); + } + return target; + } + + private static void createZipArchive(final Path fileToArchive, final Path archive) throws IOException + { + try (ZipOutputStream zipOutput = new ZipOutputStream(Files.newOutputStream(archive))) + { + zipOutput.putNextEntry(new ZipEntry(fileToArchive.getFileName().toString())); + Files.copy(fileToArchive, zipOutput); + zipOutput.closeEntry(); + } + } +} diff --git a/native-image/src/test/resources/native-image/sample-tag-requirement.md b/native-image/src/test/resources/native-image/sample-tag-requirement.md new file mode 100644 index 00000000..b6f79853 --- /dev/null +++ b/native-image/src/test/resources/native-image/sample-tag-requirement.md @@ -0,0 +1,7 @@ +# Native Image Requirement + +`req~native-image-markdown~1` + +Description. + +Needs: impl diff --git a/native-image/src/test/resources/native-image/sample.feature b/native-image/src/test/resources/native-image/sample.feature new file mode 100644 index 00000000..352516c4 --- /dev/null +++ b/native-image/src/test/resources/native-image/sample.feature @@ -0,0 +1,7 @@ +Feature: Native image Gherkin + + @id:scn~native-image-gherkin~1 + Scenario: Built in Gherkin importer is available + Given a native executable + When the executable traces this feature + Then the scenario is imported diff --git a/native-image/src/test/resources/native-image/sample.java b/native-image/src/test/resources/native-image/sample.java new file mode 100644 index 00000000..fed9b317 --- /dev/null +++ b/native-image/src/test/resources/native-image/sample.java @@ -0,0 +1,2 @@ +// [impl~native-image-tag~1->req~native-image-markdown~1] +class NativeImageTagFixture {} diff --git a/native-image/src/test/resources/native-image/sample.md b/native-image/src/test/resources/native-image/sample.md new file mode 100644 index 00000000..52758f08 --- /dev/null +++ b/native-image/src/test/resources/native-image/sample.md @@ -0,0 +1,5 @@ +# Native Image Requirement + +`req~native-image-markdown~1` + +Description. diff --git a/native-image/src/test/resources/native-image/sample.oreqm b/native-image/src/test/resources/native-image/sample.oreqm new file mode 100644 index 00000000..d03fd1e1 --- /dev/null +++ b/native-image/src/test/resources/native-image/sample.oreqm @@ -0,0 +1,9 @@ + + + + + native-image-specobject + 1 + + + diff --git a/native-image/src/test/resources/native-image/sample.rst b/native-image/src/test/resources/native-image/sample.rst new file mode 100644 index 00000000..09b99d2f --- /dev/null +++ b/native-image/src/test/resources/native-image/sample.rst @@ -0,0 +1,6 @@ +Native Image Requirement +======================== + +req~native-image-rst~1 + +Description. diff --git a/oft-self-trace.sh b/oft-self-trace.sh index a35633ef..f6615b03 100755 --- a/oft-self-trace.sh +++ b/oft-self-trace.sh @@ -30,6 +30,9 @@ if $oft_script trace \ "$base_dir/reporter/html/src" \ "$base_dir/reporter/aspec/src" \ "$base_dir/product/src/test/java" \ + "$base_dir/native-image/src/main" \ + "$base_dir/native-image/src/test/java" \ + "$base_dir/.github/workflows" \ "$base_dir/api/src" \ "$base_dir/exporter/specobject/src" \ "$base_dir/exporter/common/src" \ diff --git a/pom.xml b/pom.xml index 9ee6edf9..0f1e0bcc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,7 @@ api core product + native-image exporter/common exporter/specobject importer/lightweightmarkup diff --git a/product/pom.xml b/product/pom.xml index e3c991a4..aefa2c41 100644 --- a/product/pom.xml +++ b/product/pom.xml @@ -95,6 +95,7 @@ true false + /fo o/bär/baz:12345678"); + // macOS filesystem providers may expose this path in NFC or NFD form; + // Path.toUri() preserves that form, so JDK and GraalVM builds can differ. + final String actual = formatAsSpan(Location.create("/fo o/bär/baz", 12345678)); + assertThat(actual, anyOf( + equalTo("/fo o/bär/baz:12345678"), + equalTo("/fo o/bär/baz:12345678"))); } @Test @@ -116,4 +119,4 @@ void testIllegalUri() { assertPathAndLineRenderedToSpan("http://example.org/a b", 5, "http://example.org/a b:5"); } -} \ No newline at end of file +}