<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Oct 21, 2022 at 6:06 PM Thomas Reinhardt <<a href="mailto:thomas.reinhardt@s4p.de">thomas.reinhardt@s4p.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I think there is a misunderstanding here.<br>
<br>
What I want is basically create a zip that contains all needed jars and <br>
run my application via "java -jar myapp.jar". </blockquote><div><br></div><div>This assumes that end users have at least a JRE on their local machine, which is already platform dependent. So they already download platform dependent code, hence it makes sense to me that they also download platform dependent zips, no?</div><div>But if you go one step beyond requiring a JRE, you could also require maven to be available locally, in which case you let maven download the required parts (and only those parts required at runtime for your specific OS). </div><div>The even better option here, imho, is to use jpackage (which can also be invoked from the plugins) to build platform-specific applications.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Of course there exists a <br>
proper exe for windows users etc but thats besides the point. The one <br>
thing the whole discussion is about is that I want to use the same zip <br>
for all supported platforms (linux and windows in my case). What I <br>
specifically NOT want is platform dependent zips. We have a very large <br>
number of dependencies and the size of the whole thing (zipped) is about <br>
300MB. Having os specific versions would basically double that size for <br>
our nexus instance, the download server etc.<br></blockquote><div><br></div><div>I agree different versions would lead to more disk space on your nexus if you have 300MB jars. But apart from that, a single version would be annoying for users. They will have to download OS-specific libraries that are useless on their machines. For example, the native libs required for webkit are about 100MB. If you are going to bundle only the desktop ones (linux/win/mac arm/amd) you will have about 600MB already, of which 500MB is useless. Apart from requiring more diskspace for the end user, it will also increase the data transfer drastically.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
To be clear: the whole thing has to run on the classpath and is not <br>
modularized (yet). Not what we want but what other dependencies are <br>
forcing us to do.<br></blockquote><div><br></div><div>That's fine -- happens often and not much you can do about it. </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
If I read the source correctly, the javafx-maven-plugin can either run <br>
the application on my dev machine (why?) or create platform dependent <br>
runtime images.<br>
Am I missing something?<br></blockquote><div><br></div><div>I still think the platform dependent runtime images (or the platform independent pom files) are the best approach. The only drawback I see is that indeed those images will then consume disk space on your nexus. </div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Seriously, isn't the sole existence of this plugin an indicator that <br>
something is not quite right?<br></blockquote><div><br></div><div>I don't see why. The goal of OpenJFX is to deliver the JavaFX code, which has a platform independent Java API and a number of implementations that contain a mix of platform independent Java code, platform dependent Java code, and platform dependent native code. This is the same situation as in OpenJDK. </div><div>The plugins allow developers to deal with this relative complexity, but they solve a different problem. Since there are different requirements for different environments (e.g. some environments do not allow a JVM), there is no one size fits all. The javafx maven/gradle plugins in github mainly help developer use cases, and allow for bundling required mods with jlink in a platform-dependent bundle. If you go one step further, the Gluon plugins allow to pre-compile everything ahead of time and bundle everything in a binary that doesn't require/bundles a JVM (see <a href="https://github.com/gluonhq/gluonfx-maven-plugin">https://github.com/gluonhq/gluonfx-maven-plugin</a> and <a href="https://github.com/gluonhq/gluonfx-gradle-plugin">https://github.com/gluonhq/gluonfx-gradle-plugin</a>).</div><div>We don't have these plugins because the concepts in OpenJFX are broken, but they make life of a large number of developers and users easier. Granted, they don't cover all use cases. The specific case you talk about where you want to have a zip with all native libs combined is not out of the box covered, but it can easily be added -- I just don't think this usecase is very common for the reasons I already mentioned.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
Again, apologies if this sounds personal or unfriendly in any way. Not <br>
intended at all.<br></blockquote><div><br></div><div>Don't worry, no problem at all, it's good to ask and discuss those things!</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<br>
        -Thomas<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
On 21/10/2022 11:54, Johan Vos wrote:<br>
> <br>
> <br>
> On Fri, Oct 21, 2022 at 11:38 AM Thomas Reinhardt <br>
> <<a href="mailto:thomas.reinhardt@s4p.de" target="_blank">thomas.reinhardt@s4p.de</a> <mailto:<a href="mailto:thomas.reinhardt@s4p.de" target="_blank">thomas.reinhardt@s4p.de</a>>> wrote:<br>
> <br>
> <br>
>     As for the javafx-maven-plugin: I don't see how this would help<br>
>     here. It<br>
>     states on the github page "JavaFX dependencies are added as usual".<br>
> <br>
> <br>
> ... but you don't have to add a classifier (or an exhaustive list of <br>
> classifiers) as that is what the plugin takes care about. Hence: you <br>
> just depend on javafx.controls and you don't mention <br>
> javafx.controls:linux-x86_64 etc in your pom at all.<br>
> <br>
> Unless I'm missing something, I don't see the problem (no need for <br>
> having 12 dependencies instead of 2).<br>
> <br>
> - Johan<br>
</blockquote></div></div>