Skip to content

Maven toolchains support #2

Description

@mkpaz

Some OpenJDK vendors like Liberica or Zulu provide OpenJDK builds with bundled OpenJFX. This is useful if someone wants to build its app for OS arch that OpenJFX doesn't support itself (e.g. for x32 Windows systems).

To create native images in a cross-platform fashion one have to specify corresponding jmods source. From what I've learned from jpackage-template you extracted jmods from OpenJFX dist and keeping them with code in the same repo. I'm not sure, but it looks like this may result to error if someone will try to create native Linux image from Windows. In that case jlink will always pickup Java jmods from Windows version and OpenJFX jmods from target platform version.

Maven Toolchains is merely a provider to locate Java home directory based on some filter criteria. So one can use it to build for different platforms and against different JDK versions from the single machine. Here is an example how toolchains support is implemented in Moditect. It basically just searches jmods dir based on JDK path specified and includes it to module path. It would be really nice if JToolProvider supported similar option in addition to modulePath. Like, when baseJdk is specified its jmod dir is added to the specified in modulePath value.

In any case thank you very much for your work. JToolProvider may be small but also super flexible as it works like simple CLI wrapper.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions