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

feat: implement Jlink plugin #951

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open

Conversation

vpa1977
Copy link
Contributor

@vpa1977 vpa1977 commented Jan 6, 2025

This MR resolves #891

It adds jlink plugin along with unit and integration tests and plugin documentation.

  • Have you signed the CLA?
  • Have you added an entry to the changelog (docs/reference/changelog.rst)?

Introduce jlink plugin to create Java runtime
for the application.
canonical#891
Add initial documentation for the jlink plugin.
@vpa1977 vpa1977 marked this pull request as ready for review January 8, 2025 03:55
@tigarmo tigarmo requested review from tigarmo and mr-cal January 14, 2025 12:48
.github/workflows/tests.yaml Show resolved Hide resolved
craft_parts/plugins/jlink_plugin.py Outdated Show resolved Hide resolved
craft_parts/plugins/jlink_plugin.py Outdated Show resolved Hide resolved
The JAVA_HOME is prepended to the classpath and
if defined overrides JDK that is used by jlink plugin.

The jlink_java_version option is dropped as the version is determined by the jar version.
- Add JAVA_HOME usage
- drop jlink_java_version
The property is dropped from the plugin.
Drop the test.
@vpa1977 vpa1977 requested a review from tigarmo January 20, 2025 05:32
Copy link
Contributor

@tigarmo tigarmo left a comment

Choose a reason for hiding this comment

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

thanks!

craft_parts/plugins/jlink_plugin.py Outdated Show resolved Hide resolved
craft_parts/plugins/jlink_plugin.py Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/reference/changelog.rst Outdated Show resolved Hide resolved
@tigarmo tigarmo requested a review from medubelko January 22, 2025 19:54
@vpa1977 vpa1977 requested review from medubelko and tigarmo January 23, 2025 19:08
Copy link
Contributor

@tigarmo tigarmo left a comment

Choose a reason for hiding this comment

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

Thanks a lot, this is great. @medubelko @mr-cal can we get this across the finish line?

Copy link
Contributor

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

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

Nice work, this is looking good.

craft_parts/plugins/jlink_plugin.py Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
tests/unit/plugins/test_jlink_plugin.py Outdated Show resolved Hide resolved
docs/reference/changelog.rst Outdated Show resolved Hide resolved
Copy link
Contributor

@medubelko medubelko left a comment

Choose a reason for hiding this comment

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

There are some remaining YAML indentation quirks.

docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/common/craft-parts/reference/plugins/jlink_plugin.rst Outdated Show resolved Hide resolved
docs/reference/changelog.rst Outdated Show resolved Hide resolved
@vpa1977 vpa1977 requested a review from mr-cal January 25, 2025 02:03
Copy link
Contributor

@mr-cal mr-cal left a comment

Choose a reason for hiding this comment

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

Thanks!

@vpa1977, have you tested building a simple snap, rock, or charm with the jlink plugin? I'm happy to publish a version of snapcraft with this plugin to make it easy.

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.

Jlink support for Java plugin
4 participants