You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Abhinay Agarwal <ab...@live.com> on 2021/03/31 17:48:53 UTC
[MJLINK] Create JavaFX application runtime
Hi,
I tried to create runtime images for JavaFX applications using maven-jlink-plugin. The jlink:jlink goal fails as some JavaFX dependencies are "Automatic Modules". More information on this can be found here: https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/master/README.md
maven-jlink-plugin extracts all the modules from the module-path and adds them to the `--add-modules` list. The existing JavaFX Maven plugin<https://github.com/openjfx/javafx-maven-plugin> adds only the base module to the `--add-modules` list overcoming this issue.
It would be great if the plugin can be extended to create runtimes for JavaFX applications.
Best regards,
Abhinay
Re: [MJLINK] Create JavaFX application runtime
Posted by Benjamin Marwell <bm...@apache.org>.
Glad it helped!
I was thinking maybe this should be filed as an issue at the javafx mailing
list.
On Thu, 1 Apr 2021, 22:59 Abhinay, <ab...@live.com> wrote:
> Hi Robert,
>
> The issue can be reproduced using theJavaFX application hosted on Github
> <https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/>. It uses
> the maven-jlink-plugin to create a native image and fails.
>
> Ben's example hosted at https://github.com/alttpj/MemeforceHunt does
> work and I was able to successfully apply the same logic to my
> application. It needs the user to exclude the transitive dependency and
> provide a platform classifier to make it work, which IMO isn't very idle
> :). The working `pom.xml` is available here:
>
> https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/working/pom.xml
>
> -Abhinay
>
>
> On 2021/04/01 10:39:48, "Robert Scholte" <r....@apache.org> wrote:
> > I'm missing a project to reproduce the issue, but I would expect that
> adding <scope>provided</scope> on those dependencies would fix it.>
> >
> > Robert>
> > On 1-4-2021 08:16:06, Abhinay Agarwal <ab...@live.com> wrote:>
> > Hi,>
> >
> > I tried to create runtime images for JavaFX applications using
> maven-jlink-plugin. The jlink:jlink goal fails as some JavaFX
> dependencies are "Automatic Modules". More information on this can be
> found here:
>
> https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/master/README.md>
>
>
> >
> > maven-jlink-plugin extracts all the modules from the module-path and
> adds them to the `--add-modules` list. The existing JavaFX Maven plugin
> adds only the base module to the `--add-modules` list overcoming this
> issue.>
> >
> > It would be great if the plugin can be extended to create runtimes
> for JavaFX applications.>
> >
> > Best regards,>
> > Abhinay>
> >
>
Re: [MJLINK] Create JavaFX application runtime
Posted by Abhinay <ab...@live.com>.
Hi Robert,
The issue can be reproduced using theJavaFX application hosted on Github
<https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/>. It uses
the maven-jlink-plugin to create a native image and fails.
Ben's example hosted at https://github.com/alttpj/MemeforceHunt does
work and I was able to successfully apply the same logic to my
application. It needs the user to exclude the transitive dependency and
provide a platform classifier to make it work, which IMO isn't very idle
:). The working `pom.xml` is available here:
https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/working/pom.xml
-Abhinay
On 2021/04/01 10:39:48, "Robert Scholte" <r....@apache.org> wrote:
> I'm missing a project to reproduce the issue, but I would expect that
adding <scope>provided</scope> on those dependencies would fix it.>
>
> Robert>
> On 1-4-2021 08:16:06, Abhinay Agarwal <ab...@live.com> wrote:>
> Hi,>
>
> I tried to create runtime images for JavaFX applications using
maven-jlink-plugin. The jlink:jlink goal fails as some JavaFX
dependencies are "Automatic Modules". More information on this can be
found here:
https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/master/README.md>
>
> maven-jlink-plugin extracts all the modules from the module-path and
adds them to the `--add-modules` list. The existing JavaFX Maven plugin
adds only the base module to the `--add-modules` list overcoming this
issue.>
>
> It would be great if the plugin can be extended to create runtimes
for JavaFX applications.>
>
> Best regards,>
> Abhinay>
>
Re: [MJLINK] Create JavaFX application runtime
Posted by Robert Scholte <rf...@apache.org>.
I'm missing a project to reproduce the issue, but I would expect that adding <scope>provided</scope> on those dependencies would fix it.
Robert
On 1-4-2021 08:16:06, Abhinay Agarwal <ab...@live.com> wrote:
Hi,
I tried to create runtime images for JavaFX applications using maven-jlink-plugin. The jlink:jlink goal fails as some JavaFX dependencies are "Automatic Modules". More information on this can be found here: https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/master/README.md
maven-jlink-plugin extracts all the modules from the module-path and adds them to the `--add-modules` list. The existing JavaFX Maven plugin adds only the base module to the `--add-modules` list overcoming this issue.
It would be great if the plugin can be extended to create runtimes for JavaFX applications.
Best regards,
Abhinay
Re: [MJLINK] Create JavaFX application runtime
Posted by Benjamin Marwell <bm...@apache.org>.
Also had troubles, but in the end I got it working. You can use my simple
GUI app for ROM manipulation as a template if you like.
https://github.com/alttpj/MemeforceHunt
It's a bit complicated as multiple OSes need to be supported.
HTH
Ben
On Thu, 1 Apr 2021, 08:16 Abhinay Agarwal, <ab...@live.com> wrote:
> Hi,
>
> I tried to create runtime images for JavaFX applications using
> maven-jlink-plugin. The jlink:jlink goal fails as some JavaFX dependencies
> are "Automatic Modules". More information on this can be found here:
> https://github.com/abhinayagarwal/maven-jlink-plugin-javafx/blob/master/README.md
>
> maven-jlink-plugin extracts all the modules from the module-path and adds
> them to the `--add-modules` list. The existing JavaFX Maven plugin<
> https://github.com/openjfx/javafx-maven-plugin> adds only the base
> module to the `--add-modules` list overcoming this issue.
>
> It would be great if the plugin can be extended to create runtimes for
> JavaFX applications.
>
> Best regards,
> Abhinay
>