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

Add a simple jlink wrapper #1220

Merged
merged 7 commits into from
May 5, 2019
Merged

Add a simple jlink wrapper #1220

merged 7 commits into from
May 5, 2019

Conversation

nigredo-tori
Copy link
Collaborator

This scans the fullClasspath (using jdeps), and builds a JVM image (using jlink) from all the referenced modules. The image is then "mounted" to a configurable prefix in Universal / mappings (jre/ by default). The image location is then passed to the start scripts with the highest priority (higher than JAVA_HOME).

Potential issues (feedback required):

  • I'm not sure how to wire this into the existing CI setup, since the whole thing requires Java 11.
  • Java 9 support is theoretically possible, but would require some fiddling with jdeps output. I'm not sure it is worth the trouble.
  • It might be better to only limit the image to the standard modules (java.*, javafx.*, jdk.*), since everything else is already provided by the JavaAppPackaging. I can think both of pros and cons to this - maybe this warrants adding a separate incision point for transforming the detected module list?

Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

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

World class pull request 😍

Let me check the travis.ymlto see if we can add a new java11 testing stage.

@muuki88
Copy link
Contributor

muuki88 commented May 2, 2019

Adding this to the.travis.yml should probably work

- script: sbt "^validateJdkPackagerTravis"
  name: "scripted jlink tests"
  jdk: oraclejdk11
  if: type = pull_request OR (type = push AND branch = master)

Maybe after https://github.com/sbt/sbt-native-packager/blob/master/.travis.yml#L77

@nigredo-tori
Copy link
Collaborator Author

Adding this to the.travis.yml should probably work

Done this, but I can't check that it works because of the MiMa problem.

Copy link
Contributor

@muuki88 muuki88 left a comment

Choose a reason for hiding this comment

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

Thanks for your awesome work on this and brining jlinkto native-packager 🎉 🤗

The last nitpick can be fixed in a separate PR if you got the time 😄 I will release this immediately. Also thanks for making sure things are kept binary compatbile.

@muuki88
Copy link
Contributor

muuki88 commented May 5, 2019

well 😂 , you have been faster then me writing my comment. getPath already fixed 👍

@muuki88 muuki88 merged commit f39bf3b into sbt:master May 5, 2019
@muuki88
Copy link
Contributor

muuki88 commented May 5, 2019

version 1.3.21 is on its way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants