Closed vukca closed 2 years ago
Hi @vukca!
I've seen that you are bundling a full JDK with your app:
<jrePath>${java.home}</jrePath>
This is not a good idea, as it will add an unnecessary size to your app.
Why don't you let JavaPackager to generate a customized JRE for your app? Just omit jrePath
and JavaPackager will do all the magic for you. If you have problems due to missing modules when generating a customized JRE, try also with customizedJRE=false
.
I am trying to figure out what could be causing such a trivial error, running the
sudo mvn package
on the other hand produces the following error:Plugin io.github.fvarrui:javapackager:1.7.0-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact io.github.fvarrui:javapackager:jar:1.7.0-SNAPSHOT
This could be caused due to JavaPackager 1.7.0-SNAPSHOT doesn't exist in root
's .m2 folder, as it has
to be installed manually because this version is not released to Maven Central. Not a good idea either! 😅
P.S. Many thanks for creating this great plugin! :)
Thanks to you for using JavaPackager!
Hi @vukca! Did you manage to fix this?
Hi @vukca! Did you manage to fix this?
Hi, sorry for not responding for a longer time period. I did indeed manage to create the artifacts. Anyways I was including the full JDK since I wrote the GUI application with Java 18 and had to run .jars that are confirmed to work with older versions of JRE, well that was the original idea anyway. The root of my problem was pretty silly of me and took me some time to figure out and that was the fact that I was not referencing to my local .m2 repository in which I built the 1.7.0-SNAPSHOT with Gradle but instead let the IntelliJ handle the Maven binary through the built-in one. Either way everything is solved! Thanks for help!
Great!!
Hello! I'm submitting a Mojo bug for the 1.7.0-SNAPSHOT version. I am unable to package my application due to strange behavior of the plugin.
Pom.xml
sudo mvn package
on the other hand produces the following error:Of course running the package command as superuser should not make any difference since the mentioned directory is not located in the protected directory.
P.S. Many thanks for creating this great plugin! :)