Platform independent deployment
Nir Lisker
nlisker at gmail.com
Thu Oct 20 15:52:40 UTC 2022
Hi Thomas,
Did you try to just specify the platform-specific dependencies in the POM?
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>19</version>
<classifier>win</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>19</version>
<classifier>linux</classifier>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>19</version>
<classifier>mac</classifier>
</dependency>
Seems more of a question for help forums, though if this information is not
mentioned in https://openjfx.io/openjfx-docs/#introduction, it might be
worth adding it.
On Thu, Oct 20, 2022 at 9:42 AM Thomas Reinhardt <thomas.reinhardt at s4p.de>
wrote:
>
> Hi!
>
> Apologizes if this is not the proper list to ask my question.
>
> For context: we are using the WebView of JavaFX in our legacy swing
> based frontend application. For now that is the only component we are
> using but we might migrate completely at a later point in time.
>
> I have an issue with the way platform dependent dependencies are
> handled. We are using maven btw.
> My understanding is that during the build a profile is selected based on
> the host os name and architecture. That profile then sets a property
> (javafx.platform) that is in turn used as the classifier for platform
> dependent dependencies.
> (Offtopic to my question: eclipse warns that the profile ids are not
> unique in the org.openjfx:javafx pom.xml).
>
> Which means that the result of my build is locked to a single platform.
> But we have customers for windows and linux and don't want to have
> separate artifacts as that would mean we also have to handle that
> distinction in our installer etc.
>
> I know I can override the automatically detected platform but that does
> not solve the issue.
>
> Ideally I would use something like -Djavafx.platform=all but that does
> not exist.
>
> My question is: is there an existing solution where I can just include
> all platform dependencies for say windows and linux and the runtime
> "sorts it out"? A naive test (manual copying of artifacts) of mine
> unfortunately failed. Of course I could just use custom classloaders and
> do it myself but I really would prefer to use an existing solution and
> not implement some workaround.
>
> If there is no solution (yet), is there interest in such a feature? We
> might be able to contribute to the project.
>
>
> -Thomas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/openjfx-dev/attachments/20221020/f9ab4192/attachment.htm>
More information about the openjfx-dev
mailing list