Skip to content

Conversation

@vpa1977
Copy link
Contributor

@vpa1977 vpa1977 commented Aug 29, 2024

  • Have you signed the CLA?

This PR adds jlink plugin that allows to generate Java runtime tailored for the Java application.
When ran without supplying jar file property it will search the staging area for any jars and generate an image for them.
If no jar files are found, then java.base image will be generated.

This PR includes unit and integration tests.
The plugin documentation is split into separate PR: #689

Sample ROCK using plugin: https://github.com/canonical/openjdk-rocks/tree/prototype/demos/java-runtime

@vpa1977
Copy link
Contributor Author

vpa1977 commented Sep 9, 2024

Added PR for the linkcheck linter failure: #700

@vpa1977
Copy link
Contributor Author

vpa1977 commented Sep 9, 2024

This is probably worth having a plugin-jlink spread test like the plugin-python ones.

Thanks!!! I have added one.

@vpa1977 vpa1977 requested a review from lengau September 9, 2024 06:24
@lengau
Copy link
Collaborator

lengau commented Sep 21, 2024

I discussed this with my team this week, and the conclusion was that the way we should do this is as an option for the base Java plugin.

So the default behaviour would be the current behaviour (which I think is to not stage a JRE?), but the jlink options here would be changed to <plugin>-jlink-<option>, and if any of them are set, it would use jlink to stage the JRE. Do you think that's reasonable/feasible?

@vpa1977
Copy link
Contributor Author

vpa1977 commented Sep 22, 2024

I discussed this with my team this week, and the conclusion was that the way we should do this is as an option for the base Java plugin.

So the default behaviour would be the current behaviour (which I think is to not stage a JRE?), but the jlink options here would be changed to <plugin>-jlink-<option>, and if any of them are set, it would use jlink to stage the JRE. Do you think that's reasonable/feasible?

Hmm, so we will have to enumerate plugin properties in java plugin and retrieve ones with jlink key in it?

Also we need ability to decouple build and stage Java.
Example is test libraries requiring higher version then the release jar.
In this case we will have to stage Java runtime in a separate part.

@vpa1977 vpa1977 mentioned this pull request Oct 13, 2024
1 task
@vpa1977 vpa1977 requested a review from lengau October 13, 2024 19:40
@cjdcordeiro cjdcordeiro requested review from linostar and removed request for gregory-schiano November 15, 2024 11:02
@vpa1977
Copy link
Contributor Author

vpa1977 commented Nov 19, 2024

Closing PR - we will implement this functionality in the base java plugin

@vpa1977 vpa1977 closed this Nov 19, 2024
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.

4 participants