Javi
12/22/2024, 1:12 PMMain-Class
attribute manually and it is not done automatically by the application
plugin? The problem is with Docker.
If I run it with ./gradlew run
I don't need to setup it to get it working, but when I copy the jar file created by the installDist
o by the jar
tasks, it does not work.Philip W
12/22/2024, 4:30 PMJavi
12/22/2024, 4:31 PMPhilip W
12/22/2024, 4:36 PMPhilip W
12/22/2024, 4:36 PMVampire
12/22/2024, 7:56 PMVampire
12/22/2024, 7:56 PMVampire
12/22/2024, 7:57 PMapplication
plugin does not set the Main-Class
attribute as it does not make any sense to set it.Vampire
12/22/2024, 7:57 PMapplication
plugin is not building a bad-practice fat "runnable" jar.Vampire
12/22/2024, 7:58 PMVampire
12/22/2024, 7:58 PMVampire
12/22/2024, 7:58 PMJavi
12/22/2024, 8:01 PMSetting the main class in that jar attribute is not really helpful, unless you have no external dependencies at allHow should I solve then the problem with Docker?
Vampire
12/22/2024, 8:01 PMVampire
12/22/2024, 8:02 PMVampire
12/22/2024, 8:02 PMJavi
12/22/2024, 8:02 PMapplication
plugin? Or shadow
one?Vampire
12/22/2024, 8:02 PMJavi
12/22/2024, 8:02 PMVampire
12/22/2024, 8:02 PMapplciation
of course, shadow
is building bad-practice fat jars with no added value, I don't ever use it if I can avoid itVampire
12/22/2024, 8:03 PMVampire
12/22/2024, 8:03 PMVampire
12/22/2024, 8:04 PMVampire
12/22/2024, 8:04 PMVampire
12/22/2024, 8:04 PMJavi
12/22/2024, 8:06 PMinstallDist
fails. Maybe I can try the .tar
approachVampire
12/22/2024, 8:07 PMVampire
12/22/2024, 8:07 PMjava -jar ...jar
because that is not its intentionVampire
12/22/2024, 8:07 PMbin/
unless you changed configuration) to start the application as documentedVampire
12/22/2024, 8:08 PMjar
is just a plain jar
containing your code, nothing more.Vampire
12/22/2024, 8:08 PMClass-Path
attribute is set.Vampire
12/22/2024, 8:08 PMJavi
12/22/2024, 8:09 PMIt fails to be used like java -jar ...jar because that is not its intentionYep, I am doing this
Javi
12/22/2024, 8:09 PMVampire
12/22/2024, 8:09 PMapplication
plugin ... because that is not the intended way how to use it 😉Vampire
12/22/2024, 8:10 PMJavi
12/22/2024, 8:12 PMapp.jar
will not pick the rest of jar as you commented above about the dependencies.Javi
12/22/2024, 8:12 PMJavi
12/22/2024, 8:14 PMVampire
12/22/2024, 8:20 PMVampire
12/22/2024, 8:20 PMJavi
12/22/2024, 8:25 PM.sh
extension so I was missing that point.
build/install/app/bin/app
Javi
12/22/2024, 8:33 PMPhilip W
12/23/2024, 9:15 AMVampire
12/23/2024, 11:45 AMVampire
12/23/2024, 11:49 AM