fvarrui / JavaPackager

:package: Gradle/Maven plugin to package Java applications as native Windows, MacOS, or Linux executables and create installers for them.
GNU General Public License v3.0
1.07k stars 133 forks source link

How to remove libs directory from the generated installation? #191

Closed RiverChu0 closed 2 years ago

RiverChu0 commented 2 years ago

I'm submitting a…

Short description of the issue/suggestion: I use property wrapJar=true then generated exe included my jars. I don't want libs directory. How do I remove it from the generated installation?

Steps to reproduce the issue/enhancement: projectDir -jre/ -libs/ -LICENSE -project.exe -project.ico

What is the expected behavior? remove libs/ and project.ico

What is the current behavior? libs/ and project.ico is redundant.

Please tell us about your environment:

Other information (e.g. related issues, suggestions how to fix, links for us to have context)

fvarrui commented 2 years ago

Hi @RiverChu0! Are you bundling your own fat JAR? If so, you can set copyDependencies=false, so libs folder is not created. Otherwise, the wrapped JAR only includes your code, not its dependencies, and your app needs them.

fvarrui commented 2 years ago

AFAIK, only one JAR can be wrapped in EXE file with Launch4j. So, if you want to wrap your libraries in EXE, you should create and bundle your own fat/uber JAR

RiverChu0 commented 2 years ago

Hi @RiverChu0! Are you bundling your own fat JAR? If so, you can set copyDependencies=false, so libs folder is not created. Otherwise, the wrapped JAR only includes your code, not its dependencies, and your app needs them.

Ok,that is work! thanks!