diff --git a/.github/workflows/deploy-documentation.yml b/.github/workflows/deploy-documentation.yml index 735677aa0..0154433ec 100644 --- a/.github/workflows/deploy-documentation.yml +++ b/.github/workflows/deploy-documentation.yml @@ -19,7 +19,7 @@ jobs: fail-fast: false matrix: java-version: [ 17 ] - os: [ ubuntu-20.04 ] + os: [ ubuntu-22.04 ] steps: - name: "☁ Checkout repository" uses: actions/checkout@v4 diff --git a/.github/workflows/deploy-snapshots.yml b/.github/workflows/deploy-snapshots.yml index 5934f1529..1a528a648 100644 --- a/.github/workflows/deploy-snapshots.yml +++ b/.github/workflows/deploy-snapshots.yml @@ -2,7 +2,7 @@ name: "Deploy snapshots" on: workflow_run: - workflows: [ "deploy-documentation", "test-native-gradle-plugin", "test-native-maven-plugin", "test-junit-platform-native" ] + workflows: [ "Deploy documentation to website", "Test native-gradle-plugin", "Test native-maven-plugin", "Test junit-platform-native" ] branches: [ "master" ] types: - completed diff --git a/.github/workflows/test-graalvm-metadata.yml b/.github/workflows/test-graalvm-metadata.yml index 749b9752a..36290d411 100644 --- a/.github/workflows/test-graalvm-metadata.yml +++ b/.github/workflows/test-graalvm-metadata.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: java-version: [ 17 ] - os: [ ubuntu-20.04 ] + os: [ ubuntu-22.04 ] steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -42,7 +42,7 @@ jobs: run: ./gradlew :graalvm-reachability-metadata:test - name: "📜 Upload tests results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: tests-results + name: tests-results-${{ strategy.job-index }}-${{ matrix.java-version }}-${{ matrix.os }} path: common/graalvm-reachability-metadata/build/reports/tests/ diff --git a/.github/workflows/test-junit-platform-native.yml b/.github/workflows/test-junit-platform-native.yml index d72775211..51c03960b 100644 --- a/.github/workflows/test-junit-platform-native.yml +++ b/.github/workflows/test-junit-platform-native.yml @@ -27,7 +27,7 @@ jobs: fail-fast: false matrix: java-version: [ 17 ] - os: [ ubuntu-20.04 ] + os: [ ubuntu-22.04 ] steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -44,7 +44,7 @@ jobs: run: ./gradlew :junit-platform-native:nativeTest - name: "📜 Upload tests results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: tests-results + name: tests-results-${{ strategy.job-index }}-${{ matrix.java-version }}-${{ matrix.os }} path: common/junit-platform-native/build/reports/tests/ diff --git a/.github/workflows/test-native-gradle-plugin.yml b/.github/workflows/test-native-gradle-plugin.yml index 99203a3eb..96765a0f3 100644 --- a/.github/workflows/test-native-gradle-plugin.yml +++ b/.github/workflows/test-native-gradle-plugin.yml @@ -26,7 +26,7 @@ concurrency: jobs: populate-matrix: name: "Set matrix" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 5 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -63,14 +63,14 @@ jobs: run: ./gradlew :native-gradle-plugin:functionalTest -DgradleVersion="${{ matrix.gradle-version }}" --tests ${{ matrix.test }} - name: "📜 Upload functional tests results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: functional-tests-results-${{ matrix.gradle-version }} + name: functional-tests-results-${{ strategy.job-index }}-${{ matrix.gradle-version }} path: native-gradle-plugin/build/reports/tests/functionalTest/ populate-cache-matrix: name: "Set cache matrix" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 5 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -108,20 +108,20 @@ jobs: run: ./gradlew :native-gradle-plugin:configCacheFunctionalTest -DgradleVersion="${{ matrix.gradle-config-cache-version }}" --tests ${{ matrix.test }} - name: "📜 Upload functional tests results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: functional-tests-results-${{ matrix.gradle-config-cache-version }} + name: functional-tests-results-${{ strategy.job-index }}-${{ matrix.gradle-config-cache-version }}-${{ matrix.os }} path: native-gradle-plugin/build/reports/tests/functionalTest/ test-native-gradle-plugin: name: "Sanity checks" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 50 strategy: fail-fast: false matrix: java-version: [ 17 ] - os: [ ubuntu-20.04 ] + os: [ ubuntu-22.04 ] steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -133,9 +133,9 @@ jobs: - name: "❓ Unit tests and inspections" run: ./gradlew :native-gradle-plugin:test :native-gradle-plugin:inspections - name: "📜 Upload unit test results" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: unit-tests-results + name: unit-tests-results-${{ strategy.job-index }}-${{ matrix.java-version }}-${{ matrix.os }} path: native-gradle-plugin/build/reports/tests/test/ functional-testing-gradle-plugin-dev: @@ -147,7 +147,7 @@ jobs: fail-fast: false matrix: java-version: [ 17 ] - os: [ ubuntu-20.04 ] + os: [ ubuntu-22.04 ] steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -167,7 +167,7 @@ jobs: run: ./gradlew :native-gradle-plugin:functionalTest - name: "📜 Upload functional tests results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: functional-tests-results-graalvm-dev + name: functional-tests-results-graalvm-dev-${{ strategy.job-index }}-${{ matrix.java-version }}-${{ matrix.os }} path: native-gradle-plugin/build/reports/tests/functionalTest/ diff --git a/.github/workflows/test-native-maven-plugin.yml b/.github/workflows/test-native-maven-plugin.yml index bc748ba9d..097c5c71c 100644 --- a/.github/workflows/test-native-maven-plugin.yml +++ b/.github/workflows/test-native-maven-plugin.yml @@ -26,7 +26,7 @@ concurrency: jobs: populate-matrix: name: "Set matrix" - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" timeout-minutes: 5 outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} @@ -64,9 +64,9 @@ jobs: run: ./gradlew :native-maven-plugin:functionalTest --no-daemon --fail-fast --tests ${{ matrix.test }} - name: "📜 Upload unit test results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: maven-functional-tests-results-${{ matrix.os }} + name: maven-functional-tests-results-${{ strategy.job-index }}-${{ matrix.os }}-${{ matrix.test }} path: native-maven-plugin/build/reports/tests/ functional-testing-maven-plugin-dev: @@ -78,7 +78,7 @@ jobs: fail-fast: false matrix: java-version: [ 17 ] - os: [ ubuntu-20.04 ] + os: [ ubuntu-22.04 ] steps: - name: "☁️ Checkout repository" uses: actions/checkout@v4 @@ -98,7 +98,7 @@ jobs: run: ./gradlew :native-maven-plugin:functionalTest - name: "📜 Upload functional tests results" if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: functional-tests-results-graalvm-dev + name: functional-tests-results-graalvm-dev-${{ strategy.job-index }}-${{ matrix.os }}-${{ matrix.test }} path: native-maven-plugin/build/reports/tests/functionalTest/ diff --git a/DEVELOPING.md b/DEVELOPING.md new file mode 100644 index 000000000..8b46bd519 --- /dev/null +++ b/DEVELOPING.md @@ -0,0 +1,122 @@ +# Documentation for Developers + +This document describes how to set up and develop Native Build Tools on your local machine. + +## Environment + +Start by setting `JAVA_HOME` to a [Gradle-compatible JDK](https://docs.gradle.org/current/userguide/compatibility.html). + +Some build tasks require a GraalVM JDK (e.g., tests). You should set `GRAALVM_HOME` to an appropriate GraalVM JDK. + +## IDE Setup + +The Native Build Tools repository is structured as a Gradle multi-project, with the Maven and Gradle plugins declared as subprojects of the root project. +To configure it in your IDE (e.g., IntelliJ IDEA), import the root project, and the IDE should automatically detect and include the subprojects. + +## Building and Testing + +You can use the various commands in the [Gradle build lifecycle](https://docs.gradle.org/current/userguide/build_lifecycle.html) to build and test the project. +Some examples are (all executed from the root of the repository): + +```bash +# Compile all projects +./gradlew assemble + +# Run unit tests in all projects +./gradlew test + +# Run functional tests in all projects +./gradlew funTest + +# Compile only the native-gradle-plugin (for example) +./gradlew :native-gradle-plugin:assemble + +# Build and run all tests, complete (and very long) build +./gradlew build +``` + +## Debugging Plugin(s) + +It is often useful to attach a debugger to the Gradle and Maven plugins during a project build. + +For the Gradle plugin, this can be accomplished by passing debugger options to the Gradle daemon via `org.gradle.jvmargs`, for example: + +```bash +JAVA_OPTS="-Dorg.gradle.jvmargs=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8000" ./gradlew assemble +``` + +The Gradle daemon will suspend on start-up, wait for you to attach a debugger, and then remain attached for subsequent Gradle commands. + +For the Maven plugin, simply use the `mvnDebug` command in place of the `mvn` command. + +## Testing Local Changes with an Existing Project + +A common development task is to modify a plugin and then test it with an existing project. + +To do this, first modify the project as necessary, and then build and publish the plugins: +```bash +./gradlew publishAllPublicationsToCommonRepository --no-parallel +``` +The above command publishes to a "common" repository located at `build/common-repo`. + +Next, update the project build files: +1. Update the version string. The version can be found manually by searching for the published artifacts in `build/common-repo`, or alternatively by checking the `nativeBuildTools` property [here](gradle/libs.versions.toml). +2. Update the list of repositories to include and prioritize the common repo. + +### Gradle + +Make the following changes to the build files: +```bash +# build.gradle + plugins { + ... +- id 'org.graalvm.buildtools.native' version '0.9.25' ++ id 'org.graalvm.buildtools.native' version '0.10.5-SNAPSHOT' + } + + repositories { ++ maven { ++ name = "common" ++ url = "$NATIVE_BUILD_TOOLS_ROOT/build/common-repo" ++ } + ... + } + +# settings.gradle + pluginManagement { + repositories { ++ maven { ++ name = "common" ++ url = "$NATIVE_BUILD_TOOLS_ROOT/build/common-repo" ++ } + # NB: If repositories were not specified before, declaring the common + # repo will overwrite the default repository; you may also need to + # declare that repository explicitly. + mavenCentral() + ... + } + } +``` +Then, run the Gradle command as usual. + +### Maven + +Make the following changes to _pom.xml_: +```bash +# pom.xml + + +- 0.9.25 ++ 0.10.5-SNAPSHOT + + ... ++ ++ ++ common ++ file://$NATIVE_BUILD_TOOLS_ROOT/build/common-repo ++ ++ + +``` + +Then, run the Maven command with the `-U` flag to force Maven to use an updated snapshot (e.g., `mvn -Pnative package -U`). diff --git a/README.md b/README.md index faf97aee9..08f98d95e 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,9 @@ Repository which contains build tool plugins for interoperability with [GraalVM End-user documentation about the plugins can be found [here](https://graalvm.github.io/native-build-tools/). ## Contributing + +Documentation for common developer tasks can be found [here](DEVELOPING.md). + ### Projects * [native-maven-plugin](native-maven-plugin/README.md) * [native-gradle-plugin](native-gradle-plugin/README.md) diff --git a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle index ec829c3b4..ab1fc4cba 100644 --- a/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle +++ b/build-logic/common-plugins/src/main/groovy/org.graalvm.build.github-actions-helper.gradle @@ -2,12 +2,12 @@ import groovy.json.JsonOutput def matrixDefault = [ "java-version": [ "17" ], - "os": [ "ubuntu-20.04", "windows-latest" ] + "os": [ "ubuntu-22.04", "windows-latest" ] ] // # Following versions are disabled temporarily in order to speed up PR testing "7.3.3", "7.2", "7.1", "6.8.3", def gradleVersions = [ - "gradle-version": ["current", "7.4"], + "gradle-version": ["current", "7.4", "8.13"], ] def gradleCachedVersions = [ diff --git a/build-logic/gradle-functional-testing/src/main/groovy/org.graalvm.build.functional-testing.gradle b/build-logic/gradle-functional-testing/src/main/groovy/org.graalvm.build.functional-testing.gradle index 96bc6b1c4..dd99fdcfa 100644 --- a/build-logic/gradle-functional-testing/src/main/groovy/org.graalvm.build.functional-testing.gradle +++ b/build-logic/gradle-functional-testing/src/main/groovy/org.graalvm.build.functional-testing.gradle @@ -84,7 +84,7 @@ def graalVm = javaToolchains.launcherFor { def fullFunctionalTest = tasks.register("fullFunctionalTest") ['functionalTest', 'configCacheFunctionalTest'].each { baseName -> - ["current", "7.4", "7.6.2", "8.0.1", "8.2.1"].each { gradleVersion -> + ["current", "7.4", "7.6.2", "8.0.1", "8.2.1", "8.13"].each { gradleVersion -> String taskName = gradleVersion == 'current' ? baseName : "gradle${gradleVersion}${baseName.capitalize()}" // Add a task to run the functional tests def testTask = tasks.register(taskName, Test) { diff --git a/docs/src/docs/asciidoc/changelog.adoc b/docs/src/docs/asciidoc/changelog.adoc index b8f791ef3..7adb93a9b 100644 --- a/docs/src/docs/asciidoc/changelog.adoc +++ b/docs/src/docs/asciidoc/changelog.adoc @@ -1,6 +1,16 @@ [[changelog]] == Changelog +== Release 0.10.6 + +=== Gradle plugin + +- Added options to override parameters from command line + +=== Maven plugin + +- Add support for dependency exclusions + == Release 0.10.5 - Add missing getters to `DirectoryConfiguration` diff --git a/docs/src/docs/asciidoc/css/page.css b/docs/src/docs/asciidoc/css/page.css index a5b295f86..bd3cd43ce 100644 --- a/docs/src/docs/asciidoc/css/page.css +++ b/docs/src/docs/asciidoc/css/page.css @@ -75,6 +75,7 @@ body { #preamble>.sectionbody>[class="paragraph"]:first-of-type p { color: white; + font-size: 1.0625rem; } p { diff --git a/docs/src/docs/asciidoc/gradle-plugin.adoc b/docs/src/docs/asciidoc/gradle-plugin.adoc index abb3e43a9..d2061fe9f 100644 --- a/docs/src/docs/asciidoc/gradle-plugin.adoc +++ b/docs/src/docs/asciidoc/gradle-plugin.adoc @@ -173,10 +173,31 @@ You can also pass **build-time** and **run-time** arguments: - `buildArgs.add('')`: Configures the build by passing options directly to `native-image`. You can pass any Native Image build option listed https://www.graalvm.org/reference-manual/native-image/overview/Options/[here]. - `runtimeArgs.add('')`: Specifies runtime arguments consumed by your application. -[NOTE] -==== -For options that can be set using the command line, if both DSL and command-line options are present, command-line options take precedence. -==== +==== Command line options + +The preferred way to configure native binaries is by using the DSL, so that you can provide reproducible builds which do not depend on obscure CLI invocations. +However, in some circumstances, for experimentation, it may be useful to override parameters from command line. +The following flags are available and (unless stated otherwise) will take precedence over the DSL configuration: + +|=== +|Command line option|Description +|`--image-name=`|Overrides the `imageName` property +|`--main-class=`|Overrides the `mainClass` property +|`--(no-)debug-native`|Enables or disables debug info generation +|`--(no-)verbose`|Enables or disables verbose output +|`--(no-)fallback`|Enables or disables the fallback mode +|`--(no-)quick-build-native`|Enables or disables quick build mode +|`--(no-)rich-output`|Enables or disables rich output +|`--(no-)pgo-instrument`|Enables or disables PGO instrumentation +|`--build-args`|Adds build arguments +|`--force-build-args`|Overrides build arguments (DSL will be ignored) +|`--(no-)fat-jar`|Enables or disables creation of a far jar for compilation +|`--sysprop-native`|Adds a system property for compilation +|`--env-native`|Adds an environment variable for compilation +|`--jvm-args-native`|Adds JVM arguments for compilation +|`--force-jvm-args-native`|Overrides JVM arguments (DSL will be ignored) +|=== + [[native-image-tracing-agent]] == Native Image Tracing Agent diff --git a/docs/src/docs/asciidoc/maven-plugin.adoc b/docs/src/docs/asciidoc/maven-plugin.adoc index 2fb56fdd8..648fb95c2 100644 --- a/docs/src/docs/asciidoc/maven-plugin.adoc +++ b/docs/src/docs/asciidoc/maven-plugin.adoc @@ -13,7 +13,7 @@ You can find sample applications in the https://github.com/graalvm/native-build- [[adding-the-plugin]] == Adding the Plugin -Refer to the <> which provides step-by-step directions on adding the Gradle plugin to your project, building your first native image, and running it. +Refer to the <> which provides step-by-step directions on adding the Maven plugin to your project, building your first native image, and running it. [NOTE] ==== @@ -137,6 +137,16 @@ The following configuration options are available: path/to/classes ---- +``:: + This can be used to exclude artifacts from native-image compilation. +---- + + + org.example + example + + +---- ``:: If you want to specify custom path to the JAR, or a custom directory that contains only application classes, but you want the plugin to still automatically add classpath entries for @@ -892,4 +902,4 @@ Refer to the https://maven.apache.org/plugins/maven-shade-plugin[Maven Shade plu [[javadocs]] == Javadocs -For further reference, you can review the link:javadocs/native-maven-plugin/index.html[Javadocs of the plugin]. \ No newline at end of file +For further reference, you can review the link:javadocs/native-maven-plugin/index.html[Javadocs of the plugin]. diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 211657d78..b562476eb 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] # Project versions -nativeBuildTools = "0.10.5" -metadataRepository = "0.3.15" +nativeBuildTools = "0.10.6" +metadataRepository = "0.3.18" # External dependencies spock = "2.1-groovy-3.0" diff --git a/native-gradle-plugin/README.md b/native-gradle-plugin/README.md index 38e9a3ff4..5b6ad018d 100644 --- a/native-gradle-plugin/README.md +++ b/native-gradle-plugin/README.md @@ -6,12 +6,14 @@ End-user documentation about the plugins can be found [here](https://graalvm.git ## Building -This plugin can be built with this command: +This plugin can be built with this command (from the root directory): ```bash -./gradlew publishToMavenLocal --no-parallel +./gradlew :native-gradle-plugin:publishAllPublicationsToCommonRepository --no-parallel ``` +The command will publish a snapshot to `build/common-repo`. For more details, see the [Developer documentation](../DEVELOPING.md). + In order to run testing part of this plugin you need to get (or build) corresponding `junit-platform-native` artifact. *You can also take a look at CI workflow [here](../.github/workflows/test-native-gradle-plugin.yml).* diff --git a/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/tasks/BuildNativeImageTask.java b/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/tasks/BuildNativeImageTask.java index e41e6e202..badd386bd 100644 --- a/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/tasks/BuildNativeImageTask.java +++ b/native-gradle-plugin/src/main/java/org/graalvm/buildtools/gradle/tasks/BuildNativeImageTask.java @@ -100,18 +100,88 @@ protected NativeImageCompileOptions getCompileOptions() { } @Option(option = "quick-build-native", description = "Enables quick build mode") - public void overrideQuickBuild() { - getOptions().get().getQuickBuild().set(true); + public void overrideQuickBuild(boolean quickBuild) { + getOptions().get().getQuickBuild().set(quickBuild); } @Option(option = "debug-native", description = "Enables debug mode") - public void overrideDebugBuild() { - getOptions().get().getDebug().set(true); + public void overrideDebugBuild(boolean debug) { + getOptions().get().getDebug().set(debug); + } + + @Option(option = "verbose", description = "Enables verbose mode") + public void overrideVerboseBuild(boolean verbose) { + getOptions().get().getVerbose().set(verbose); + } + + @Option(option = "fallback", description = "Enables fallback mode") + public void overrideFallbackBuild(boolean fallback) { + getOptions().get().getFallback().set(fallback); } @Option(option = "pgo-instrument", description = "Enables PGO instrumentation") - public void overridePgoInstrument() { - getOptions().get().getPgoInstrument().set(true); + public void overridePgoInstrument(boolean pgo) { + getOptions().get().getPgoInstrument().set(pgo); + } + + @Option(option = "main-class", description = "The fully qualified name of the entry point for native image compilation") + public void overrideMainClass(String mainClass) { + getCompileOptions().getMainClass().set(mainClass); + } + + @Option(option = "build-args", description = "Adds arguments for the native-image compilation") + public void appendBuildArgs(List buildArgs) { + getOptions().get().buildArgs(buildArgs); + } + + @Option(option = "force-build-args", description = "Adds arguments for the native-image compilation") + public void overrideBuildArgs(List buildArgs) { + getOptions().get().getBuildArgs().set(buildArgs); + } + + @Option(option = "rich-output", description = "Enables rich output") + public void overrideRichOutput(boolean richOutput) { + getOptions().get().getRichOutput().set(richOutput); + } + + @Option(option = "image-name", description = "The name of the generated native image") + public void overrideImageName(String imageName) { + getOptions().get().getImageName().set(imageName); + } + + @Option(option = "fatjar", description = "Uses a fat jar as an input, instead of exploded classpath") + public void overrideFatJar(boolean fatJar) { + getOptions().get().getUseFatJar().set(fatJar); + } + + @Option(option = "sysprop-native", description = "Adds a system property to the native image build (format key=value)") + public void addSystemProperty(String property) { + String[] parts = property.split("=", 2); + if (parts.length == 2) { + getOptions().get().systemProperty(parts[0], parts[1]); + } else { + getLogger().warn("Ignoring invalid system property: " + property); + } + } + + @Option(option = "env-native", description = "Adds a environment variable to the native image build (format key=value)") + public void addEnvVar(String property) { + String[] parts = property.split("=", 2); + if (parts.length == 2) { + getOptions().get().getEnvironmentVariables().put(parts[0], parts[1]); + } else { + getLogger().warn("Ignoring invalid environment variable: " + property); + } + } + + @Option(option = "jvm-args-native", description = "Adds arguments to the JVM used to build the native image") + public void appendJvmArgs(List jvmArgs) { + getOptions().get().jvmArgs(jvmArgs); + } + + @Option(option = "force-jvm-args-native", description = "Overrides arguments passed to the JVM used to build the native image") + public void overrideJvmArgs(List jvmArgs) { + getOptions().get().getJvmArgs().set(jvmArgs); } @Inject @@ -136,7 +206,7 @@ protected Provider getGraalVMHome() { @Internal public Provider getExecutableShortName() { return getOptions().flatMap(options -> - options.getImageName().zip(options.getPgoInstrument(), serializableBiFunctionOf((name, pgo) -> name + (Boolean.TRUE.equals(pgo) ? "-instrumented" : ""))) + options.getImageName().zip(options.getPgoInstrument(), serializableBiFunctionOf((name, pgo) -> name + (Boolean.TRUE.equals(pgo) ? "-instrumented" : ""))) ); } @@ -184,16 +254,16 @@ public BuildNativeImageTask() { private List buildActualCommandLineArgs(int majorJDKVersion) { getOptions().finalizeValue(); return new NativeImageCommandLineProvider( - getOptions(), - getExecutableShortName(), - getProviders().provider(() -> getWorkingDirectory().get().getAsFile().getAbsolutePath()), - // Can't use getOutputDirectory().map(...) because Gradle would complain that we use - // a mapped value before the task was called, when we are actually calling it... - getProviders().provider(() -> getOutputDirectory().getAsFile().get().getAbsolutePath()), - getClasspathJar(), - getUseArgFile(), - getProviders().provider(() -> majorJDKVersion), - getProviders().provider(() -> useColors)).asArguments(); + getOptions(), + getExecutableShortName(), + getProviders().provider(() -> getWorkingDirectory().get().getAsFile().getAbsolutePath()), + // Can't use getOutputDirectory().map(...) because Gradle would complain that we use + // a mapped value before the task was called, when we are actually calling it... + getProviders().provider(() -> getOutputDirectory().getAsFile().get().getAbsolutePath()), + getClasspathJar(), + getUseArgFile(), + getProviders().provider(() -> majorJDKVersion), + getProviders().provider(() -> useColors)).asArguments(); } // This property provides access to the service instance @@ -208,12 +278,12 @@ public void exec() { GraalVMLogger logger = GraalVMLogger.of(getLogger()); File executablePath = NativeImageExecutableLocator.findNativeImageExecutable( - options.getJavaLauncher(), - getDisableToolchainDetection(), - getGraalVMHome(), - getExecOperations(), - logger, - diagnostics); + options.getJavaLauncher(), + getDisableToolchainDetection(), + getGraalVMHome(), + getExecOperations(), + logger, + diagnostics); String versionString = getVersionString(getExecOperations(), executablePath); if (options.getRequiredVersion().isPresent()) { NativeImageUtils.checkVersion(options.getRequiredVersion().get(), versionString); diff --git a/native-maven-plugin/README.md b/native-maven-plugin/README.md index ec32ec963..e07be3ddc 100644 --- a/native-maven-plugin/README.md +++ b/native-maven-plugin/README.md @@ -6,10 +6,15 @@ End-user documentation about the plugins can be found [here](https://graalvm.git ## Building -This plugin follows standard Maven plugin conventions and can be built with this command: +This plugin can be built with this command (from the root directory): -```shell -./gradlew publishAllPublicationsToCommonRepository +```bash +./gradlew :native-maven-plugin:publishAllPublicationsToCommonRepository --no-parallel ``` +The command will publish a snapshot to `build/common-repo`. +For more details, see the [Developer documentation](../DEVELOPING.md). + +In order to run testing part of this plugin you need to get (or build) corresponding `junit-platform-native` artifact. + *You can also take a look at CI workflow [here](../.github/workflows/test-native-maven-plugin.yml).* diff --git a/native-maven-plugin/reproducers/issue-144/pom.xml b/native-maven-plugin/reproducers/issue-144/pom.xml index 43db303ea..442e8c391 100644 --- a/native-maven-plugin/reproducers/issue-144/pom.xml +++ b/native-maven-plugin/reproducers/issue-144/pom.xml @@ -56,8 +56,8 @@ 1.8 UTF-8 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 example-app org.graalvm.demo.Application diff --git a/native-maven-plugin/reproducers/issue-612/pom.xml b/native-maven-plugin/reproducers/issue-612/pom.xml new file mode 100644 index 000000000..bb217ae24 --- /dev/null +++ b/native-maven-plugin/reproducers/issue-612/pom.xml @@ -0,0 +1,130 @@ + + + + + org.graalvm.buildtools.examples + issue-612 + 1.0.0-SNAPSHOT + 4.0.0 + + 1.8 + UTF-8 + 0.10.6 + example-app + org.graalvm.demo.Application + + + + + org.yaml + snakeyaml + 2.3 + runtime + + + + + + native + + + + org.graalvm.buildtools + native-maven-plugin + ${native.maven.plugin.version} + true + + + build-native + + compile-no-fork + + package + + + + false + ${imageName} + false + + + org.yaml + snakeyaml + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + ${java.version} + 1.8 + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.2 + + + + false + ${mainClass} + + + + + + + + + + diff --git a/native-maven-plugin/reproducers/issue-612/src/main/java/org/graalvm/demo/Application.java b/native-maven-plugin/reproducers/issue-612/src/main/java/org/graalvm/demo/Application.java new file mode 100644 index 000000000..27820c4b5 --- /dev/null +++ b/native-maven-plugin/reproducers/issue-612/src/main/java/org/graalvm/demo/Application.java @@ -0,0 +1,11 @@ +package org.graalvm.demo; + +public class Application { + static String getMessage() { + return "Hello, native!"; + } + + public static void main(String[] args) { + System.out.println(getMessage()); + } +} diff --git a/native-maven-plugin/reproducers/issue-612/src/main/java/org/graalvm/demo/Calculator.java b/native-maven-plugin/reproducers/issue-612/src/main/java/org/graalvm/demo/Calculator.java new file mode 100644 index 000000000..41e072c9b --- /dev/null +++ b/native-maven-plugin/reproducers/issue-612/src/main/java/org/graalvm/demo/Calculator.java @@ -0,0 +1,9 @@ +package org.graalvm.demo; + +public class Calculator { + + public int add(int a, int b) { + return a + b; + } + +} diff --git a/native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven/SBOMFunctionalTest.groovy b/native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven/SBOMFunctionalTest.groovy index 1707d240b..7219a3384 100644 --- a/native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven/SBOMFunctionalTest.groovy +++ b/native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven/SBOMFunctionalTest.groovy @@ -44,6 +44,7 @@ package org.graalvm.buildtools.maven import com.github.openjson.JSONObject import org.graalvm.buildtools.maven.sbom.SBOMGenerator import org.graalvm.buildtools.utils.NativeImageUtils +import spock.lang.Ignore import spock.lang.Requires class SBOMFunctionalTest extends AbstractGraalVMMavenFunctionalTest { @@ -67,6 +68,7 @@ class SBOMFunctionalTest extends AbstractGraalVMMavenFunctionalTest { EE() && jdkVersionSupportsAugmentedSBOM() } + @Ignore @Requires({ supportedAugmentedSBOMVersion() }) def "sbom is exported and embedded when buildArg '--enable-sbom=export,embed' is used"() { withSample 'java-application' @@ -81,6 +83,7 @@ class SBOMFunctionalTest extends AbstractGraalVMMavenFunctionalTest { buildSucceeded outputContainsPattern".*CycloneDX SBOM with \\d+ component\\(s\\) is embedded in binary \\(.*?\\) and exported as JSON \\(see build artifacts\\)\\." outputDoesNotContain "Use '--enable-sbom' to assemble a Software Bill of Materials (SBOM)" + outputDoesNotContain "Could not generate an augmented SBOM" validateExportedSBOM sbom !file(String.format("target/%s", SBOMGenerator.SBOM_FILENAME)).exists() outputContains "Hello, native!" @@ -90,6 +93,7 @@ class SBOMFunctionalTest extends AbstractGraalVMMavenFunctionalTest { * If user sets {@link NativeCompileNoForkMojo#AUGMENTED_SBOM_PARAM_NAME} to true then Native Image should be * invoked with '--enable-sbom' and an SBOM should be embedded in the image. */ + @Ignore @Requires({ supportedAugmentedSBOMVersion() }) def "sbom is embedded when only the augmented sbom parameter is used (but not the '--enable-sbom' buildArg)"() { withSample 'java-application' @@ -101,6 +105,7 @@ class SBOMFunctionalTest extends AbstractGraalVMMavenFunctionalTest { buildSucceeded outputContainsPattern".*CycloneDX SBOM with \\d+ component\\(s\\) is embedded in binary \\(.*?\\)." outputDoesNotContain "Use '--enable-sbom' to assemble a Software Bill of Materials (SBOM)" + outputDoesNotContain "Could not generate an augmented SBOM" !file(String.format("target/%s", SBOMGenerator.SBOM_FILENAME)).exists() outputContains "Hello, native!" } diff --git a/native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven/issues/ExcludeDependenciesFunctionalTest.groovy b/native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven/issues/ExcludeDependenciesFunctionalTest.groovy new file mode 100644 index 000000000..b4b5aff0f --- /dev/null +++ b/native-maven-plugin/src/functionalTest/groovy/org/graalvm/buildtools/maven/issues/ExcludeDependenciesFunctionalTest.groovy @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2020, 2021 Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * The Universal Permissive License (UPL), Version 1.0 + * + * Subject to the condition set forth below, permission is hereby granted to any + * person obtaining a copy of this software, associated documentation and/or + * data (collectively the "Software"), free of charge and under any and all + * copyright rights in the Software, and any and all patent rights owned or + * freely licensable by each licensor hereunder covering either (i) the + * unmodified Software as contributed to or provided by such licensor, or (ii) + * the Larger Works (as defined below), to deal in both + * + * (a) the Software, and + * + * (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if + * one is included with the Software each a "Larger Work" to which the Software + * is contributed by such licensors), + * + * without restriction, including without limitation the rights to copy, create + * derivative works of, display, perform, and distribute the Software and make, + * use, sell, offer for sale, import, export, have made, and have sold the + * Software and the Larger Work(s), and to sublicense the foregoing rights on + * either these or other terms. + * + * This license is subject to the following condition: + * + * The above copyright notice and either this complete permission notice or at a + * minimum a reference to the UPL must be included in all copies or substantial + * portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package org.graalvm.buildtools.maven.issues + +import org.graalvm.buildtools.maven.AbstractGraalVMMavenFunctionalTest + +class ExcludeDependenciesFunctionalTest extends AbstractGraalVMMavenFunctionalTest { + def "can exclude dependencies from native image classpath"() { + withReproducer("issue-612") + + when: + mvn '-Pnative', '-Ddebug', '-Dverbose', '-DquickBuild', 'package' + + then: + buildSucceeded + var imagecpLineIdx = outputLines.findIndexOf { it.startsWith('-imagecp') } + var imagecpLine = outputLines[imagecpLineIdx+1] + imagecpLine != null + imagecpLine.contains("issue-612-1.0.0-SNAPSHOT.jar") + !imagecpLine.contains("snakeyaml") + } + +} diff --git a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/AbstractNativeImageMojo.java b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/AbstractNativeImageMojo.java index e2d84193b..e550ad953 100644 --- a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/AbstractNativeImageMojo.java +++ b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/AbstractNativeImageMojo.java @@ -43,6 +43,7 @@ import org.apache.maven.artifact.Artifact; import org.apache.maven.execution.MavenSession; +import org.apache.maven.model.Exclusion; import org.apache.maven.plugin.MojoExecution; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.descriptor.PluginDescriptor; @@ -56,7 +57,6 @@ import org.graalvm.buildtools.utils.SharedConstants; import javax.inject.Inject; - import java.io.BufferedReader; import java.io.File; import java.io.IOException; @@ -78,6 +78,7 @@ import java.util.Map; import java.util.Optional; import java.util.Set; +import java.util.function.Consumer; import java.util.regex.Pattern; import java.util.stream.Collectors; import java.util.stream.Stream; @@ -173,6 +174,9 @@ public abstract class AbstractNativeImageMojo extends AbstractNativeMojo { @Parameter(property = "requiredVersion") protected String requiredVersion; + @Parameter(property = "exclusions") + protected List exclusions; + @Component protected ToolchainManager toolchainManager; @@ -306,7 +310,9 @@ protected Path processArtifact(Artifact artifact, String... artifactTypes) throw } protected void addArtifactToClasspath(Artifact artifact) throws MojoExecutionException { - Optional.ofNullable(processSupportedArtifacts(artifact)).ifPresent(imageClasspath::add); + if (!isExcluded(artifact)) { + Optional.ofNullable(processSupportedArtifacts(artifact)).ifPresent(imageClasspath::add); + } } private static FileSystem openFileSystem(URI uri) throws IOException { @@ -367,6 +373,22 @@ protected void addDependenciesToClasspath() throws MojoExecutionException { } } + @Override + protected void maybeAddDependencyMetadata(Artifact dependency, Consumer excludeAction) { + if (isExcluded(dependency)) { + return; + } + super.maybeAddDependencyMetadata(dependency, excludeAction); + } + + protected boolean isExcluded(Artifact dependency) { + if (exclusions == null) { + return false; + } + return exclusions.stream() + .anyMatch(e -> e.getGroupId().equals(dependency.getGroupId()) && e.getArtifactId().equals(dependency.getArtifactId())); + } + /** * Returns path to where application classes are stored, or jar artifact if it is produced. * @return Path to application classes @@ -404,7 +426,9 @@ protected void populateClasspath() throws MojoExecutionException { } protected String getClasspath() throws MojoExecutionException { - populateClasspath(); + if (imageClasspath.isEmpty()) { + populateClasspath(); + } if (imageClasspath.isEmpty()) { throw new MojoExecutionException("Image classpath is empty. " + "Check if your classpath configuration is correct."); diff --git a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeCompileNoForkMojo.java b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeCompileNoForkMojo.java index 904a70510..01474f73b 100644 --- a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeCompileNoForkMojo.java +++ b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/NativeCompileNoForkMojo.java @@ -177,7 +177,16 @@ private void generateAugmentedSBOMIfNeeded() throws IllegalArgumentException, Mo } var sbomGenerator = new SBOMGenerator(mavenProject, mavenSession, pluginManager, repositorySystem, mainClass, logger); - sbomGenerator.generate(); + try { + sbomGenerator.generate(); + } catch (MojoExecutionException e) { + /* Only throw exception for users that explicitly opt-in to using augmented SBOMs. */ + if (optionWasSet) { + throw e; + } + logger.warn(String.format("Could not generate an augmented SBOM: %s. Fallback to generating a non-augmented SBOM.", + e.getCause().getMessage())); + } } private String consumeConfigurationNodeValue(String pluginKey, String... nodeNames) { diff --git a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/ArtifactToPackageNameResolver.java b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/ArtifactToPackageNameResolver.java index e466334fe..0f4b72d0b 100644 --- a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/ArtifactToPackageNameResolver.java +++ b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/ArtifactToPackageNameResolver.java @@ -112,7 +112,7 @@ Set getArtifactAdapters() throws Exception { return artifactsWithPackageNameMappings; } - private Optional resolvePackageNamesFromArtifact(Artifact artifact) throws ArtifactResolutionException, IOException { + private Optional resolvePackageNamesFromArtifact(Artifact artifact) throws IOException { File artifactFile = artifact.getFile(); if (artifactFile != null && artifactFile.exists()) { return resolvePackageNamesFromArtifactFile(artifactFile, ArtifactAdapter.fromMavenArtifact(artifact)); @@ -124,7 +124,13 @@ private Optional resolvePackageNamesFromArtifact(Artifact artif .setArtifact(sourceArtifact) .setRepositories(remoteRepositories); - ArtifactResult result = repositorySystem.resolveArtifact(repositorySystemSession, request); + ArtifactResult result; + try { + result = repositorySystem.resolveArtifact(repositorySystemSession, request); + } catch (ArtifactResolutionException e) { + return Optional.empty(); + } + if (result != null && result.getArtifact() != null && result.getArtifact().getFile() != null) { File sourceFile = result.getArtifact().getFile(); return resolvePackageNamesFromArtifactFile(sourceFile, ArtifactAdapter.fromEclipseArtifact(result.getArtifact())); diff --git a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/SBOMGenerator.java b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/SBOMGenerator.java index 0a1ce00f6..a2a8b72b5 100644 --- a/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/SBOMGenerator.java +++ b/native-maven-plugin/src/main/java/org/graalvm/buildtools/maven/sbom/SBOMGenerator.java @@ -238,13 +238,10 @@ private void augmentSBOM(Path baseSBOMPath, Set artifacts) thro JSONObject sbomJson = new JSONObject(Files.readString(baseSBOMPath)); JSONArray componentsArray = sbomJson.optJSONArray("components"); - if (componentsArray == null) { - throw new RuntimeException(String.format("SBOM generated by %s:%s contained no components.", Plugin.groupId, Plugin.artifactId)); + if (componentsArray != null) { + componentsArray.forEach(componentNode -> augmentComponentNode((JSONObject) componentNode, artifacts)); } - /* Augment the "components" */ - componentsArray.forEach(componentNode -> augmentComponentNode((JSONObject) componentNode, artifacts)); - /* Augment the main component in "metadata/component" */ JSONObject metadataNode = sbomJson.optJSONObject("metadata"); if (metadataNode != null && metadataNode.has("component")) { diff --git a/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/AbstractGraalVMMavenFunctionalTest.groovy b/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/AbstractGraalVMMavenFunctionalTest.groovy index 9184bb000..7800e62e3 100644 --- a/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/AbstractGraalVMMavenFunctionalTest.groovy +++ b/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/AbstractGraalVMMavenFunctionalTest.groovy @@ -228,6 +228,10 @@ abstract class AbstractGraalVMMavenFunctionalTest extends Specification { !normalizeString(result.stdOut).contains(normalizeString(text)) } + List getOutputLines() { + return normalizeString(result.stdOut).split("\n") + } + static boolean matches(String actual, String expected) { normalizeString(actual) == normalizeString(expected) } diff --git a/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/IsolatedMavenExecutor.groovy b/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/IsolatedMavenExecutor.groovy index a0f7e2d88..fdb9aca96 100644 --- a/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/IsolatedMavenExecutor.groovy +++ b/native-maven-plugin/src/testFixtures/groovy/org/graalvm/buildtools/maven/IsolatedMavenExecutor.groovy @@ -109,7 +109,7 @@ class IsolatedMavenExecutor { // adhoc filtering of Maven's download progress which is only // possible to silence since 3.6.5+ return input.replaceAll("[0-9]+/[0-9]+ [KMG]?B\\s+", "") - .replaceAll("^Download(ing|ed)( from)? : .+\$", "") + .replaceAll("^Download(ing|ed)( from)? (seed|common): .+\$", "") .replaceAll("^Progress \\([0-9]+\\).+\$", "") .trim() } diff --git a/samples/java-application-with-custom-packaging/pom.xml b/samples/java-application-with-custom-packaging/pom.xml index 3deb37d10..8657edb2d 100644 --- a/samples/java-application-with-custom-packaging/pom.xml +++ b/samples/java-application-with-custom-packaging/pom.xml @@ -61,7 +61,7 @@ 3.3.4 org.graalvm.demo.Application netty - 0.10.5 + 0.10.6 diff --git a/samples/java-application-with-custom-tests/gradle.properties b/samples/java-application-with-custom-tests/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/java-application-with-custom-tests/gradle.properties +++ b/samples/java-application-with-custom-tests/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/java-application-with-extra-sourceset/gradle.properties b/samples/java-application-with-extra-sourceset/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/java-application-with-extra-sourceset/gradle.properties +++ b/samples/java-application-with-extra-sourceset/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/java-application-with-reflection/gradle.properties b/samples/java-application-with-reflection/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/java-application-with-reflection/gradle.properties +++ b/samples/java-application-with-reflection/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/java-application-with-reflection/pom.xml b/samples/java-application-with-reflection/pom.xml index edf83e562..24a6f1f2c 100644 --- a/samples/java-application-with-reflection/pom.xml +++ b/samples/java-application-with-reflection/pom.xml @@ -52,8 +52,8 @@ 1.8 UTF-8 5.10.0 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 example-app org.graalvm.demo.Application diff --git a/samples/java-application-with-resources/gradle.properties b/samples/java-application-with-resources/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/java-application-with-resources/gradle.properties +++ b/samples/java-application-with-resources/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/java-application-with-resources/pom.xml b/samples/java-application-with-resources/pom.xml index 4bcace0ec..fff086f07 100644 --- a/samples/java-application-with-resources/pom.xml +++ b/samples/java-application-with-resources/pom.xml @@ -51,9 +51,9 @@ 1.8 UTF-8 - 0.10.5 + 0.10.6 5.10.0 - 0.10.5 + 0.10.6 example-app org.graalvm.demo.Application diff --git a/samples/java-application-with-tests/gradle.properties b/samples/java-application-with-tests/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/java-application-with-tests/gradle.properties +++ b/samples/java-application-with-tests/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/java-application-with-tests/pom.xml b/samples/java-application-with-tests/pom.xml index 0ef4b1ce5..aeb350742 100644 --- a/samples/java-application-with-tests/pom.xml +++ b/samples/java-application-with-tests/pom.xml @@ -52,8 +52,8 @@ 1.8 UTF-8 5.10.0 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 example-app org.graalvm.demo.Application diff --git a/samples/java-application/gradle.properties b/samples/java-application/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/java-application/gradle.properties +++ b/samples/java-application/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/java-application/pom.xml b/samples/java-application/pom.xml index e911b3374..bdc7616a0 100644 --- a/samples/java-application/pom.xml +++ b/samples/java-application/pom.xml @@ -51,8 +51,8 @@ 1.8 UTF-8 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 example-app org.graalvm.demo.Application diff --git a/samples/java-library/gradle.properties b/samples/java-library/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/java-library/gradle.properties +++ b/samples/java-library/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/java-library/pom.xml b/samples/java-library/pom.xml index cdfe88b94..af66aaf0f 100644 --- a/samples/java-library/pom.xml +++ b/samples/java-library/pom.xml @@ -51,8 +51,8 @@ 1.8 UTF-8 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 java-library diff --git a/samples/kotlin-application-with-tests/gradle.properties b/samples/kotlin-application-with-tests/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/kotlin-application-with-tests/gradle.properties +++ b/samples/kotlin-application-with-tests/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/metadata-repo-integration/gradle.properties b/samples/metadata-repo-integration/gradle.properties index 54baa3cdc..ed10506e5 100644 --- a/samples/metadata-repo-integration/gradle.properties +++ b/samples/metadata-repo-integration/gradle.properties @@ -1,4 +1,4 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 h2.version = 2.2.220 netty.version = 4.1.80.Final logback.version = 1.4.4 diff --git a/samples/metadata-repo-integration/pom.xml b/samples/metadata-repo-integration/pom.xml index 1281dbf3e..76e12e590 100644 --- a/samples/metadata-repo-integration/pom.xml +++ b/samples/metadata-repo-integration/pom.xml @@ -51,8 +51,8 @@ 1.8 UTF-8 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 2.2.220 4.1.108.Final 1.4.12 diff --git a/samples/multi-project-with-tests/gradle.properties b/samples/multi-project-with-tests/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/multi-project-with-tests/gradle.properties +++ b/samples/multi-project-with-tests/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/multi-project-with-tests/pom.xml b/samples/multi-project-with-tests/pom.xml index c5f20ce86..22c6b3e0c 100644 --- a/samples/multi-project-with-tests/pom.xml +++ b/samples/multi-project-with-tests/pom.xml @@ -58,8 +58,8 @@ 1.8 UTF-8 5.10.0 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 example-app org.graalvm.demo.Application diff --git a/samples/native-config-integration/gradle.properties b/samples/native-config-integration/gradle.properties index 74684fa23..a4b86bac4 100644 --- a/samples/native-config-integration/gradle.properties +++ b/samples/native-config-integration/gradle.properties @@ -1,3 +1,3 @@ -native.gradle.plugin.version = 0.10.5 +native.gradle.plugin.version = 0.10.6 junit.jupiter.version = 5.10.0 junit.platform.version = 1.10.0 diff --git a/samples/native-config-integration/pom.xml b/samples/native-config-integration/pom.xml index 82d57c8c4..66c218cba 100644 --- a/samples/native-config-integration/pom.xml +++ b/samples/native-config-integration/pom.xml @@ -51,8 +51,8 @@ 1.8 UTF-8 - 0.10.5 - 0.10.5 + 0.10.6 + 0.10.6 example-app org.graalvm.example.Application