Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removes module variable required in GraalVM 22.2 #278

Merged
merged 1 commit into from
Jul 20, 2023

Conversation

pivotal-david-osullivan
Copy link
Contributor

@pivotal-david-osullivan pivotal-david-osullivan commented Jul 19, 2023

Summary

The env var USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM is no longer needed & is showing a build warning, this PR removes setting it at build time.

Use Cases

Closes #273

Checklist

  • I have viewed, signed, and submitted the Contributor License Agreement.
  • I have linked issue(s) that this PR should close using keywords or the Github UI (See docs)
  • I have added an integration test, if necessary.
  • I have reviewed the styleguide for guidance on my code quality.
  • I'm happy with the commit history on this PR (I have rebased/squashed as needed).

@pivotal-david-osullivan pivotal-david-osullivan added semver:patch A change requiring a patch version bump type:task A general task labels Jul 19, 2023
@pivotal-david-osullivan pivotal-david-osullivan requested a review from a team as a code owner July 19, 2023 17:57
Copy link
Member

@anthonydahanne anthonydahanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello, I just tried building the Java Native Sample app at https://github.com/paketo-buildpacks/samples/tree/main/java/native-image/java-native-image-sample

with:

 pack build mymavenapp --env BP_MAVEN_ACTIVE_PROFILES=native --clear-cache --builder paketobuildpacks/builder-jammy-buildpackless-tiny:latest  \
  -b paketo-buildpacks/ca-certificates \
  -b paketo-buildpacks/bellsoft-liberica \
  -b paketo-buildpacks/syft \
  -b paketo-buildpacks/maven \
  -b paketo-buildpacks/executable-jar -b paketo-buildpacks/spring-boot -b paketo-buildpacks/native-image

and I got in the logs:

[builder] Warning: The USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM environment variable is deprecated and might be removed in a future release. Please refer to the GraalVM release notes.

like @scottfrederick mentioned: #273 (comment)

Then, I locally checked out this branch and built it locally and then try and build my native app:

pack build mymavenapp --env BP_MAVEN_ACTIVE_PROFILES=native --clear-cache --builder paketobuildpacks/builder-jammy-buildpackless-tiny:latest  \
  -b paketo-buildpacks/ca-certificates \
  -b paketo-buildpacks/bellsoft-liberica \
  -b paketo-buildpacks/syft \
  -b paketo-buildpacks/maven \
  -b paketo-buildpacks/executable-jar -b paketo-buildpacks/spring-boot -b workspaces/paketo-buildpacks/native-image       

and... I no longer had the warning from native-image !

All good!

@anthonydahanne anthonydahanne merged commit 4a3bee8 into main Jul 20, 2023
@anthonydahanne anthonydahanne deleted the module-var-removal branch July 20, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:patch A change requiring a patch version bump type:task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove USE_NATIVE_IMAGE_JAVA_PLATFORM_MODULE_SYSTEM
2 participants