How can I put all dependencies into one folder inside a JAR file with Maven?

Feniksovich

I'm using Maven and several libraries in my project, some of them are nested in the final JAR file.

The file structure inside the JAR file now looks like this:

jar
│
├───com
│   ├───feniksovich (my project)
│   └───zaxxer (hikari shaded lib directory)                 
│
├───org
│   ├───apache (commons-io shaded lib directory)
│   └───slf4j (slf4j shaded lib directory)
└───redis (jedis shaded lib directory)

Is it possible to make it look something like this?

jar
│
├───com
│   └───feniksovich (my project)               
│
└───libs
    ├───com
    │   └───zaxxer (hikari shaded lib directory)
    ├───org
    │   ├───apache (commons-io shaded lib directory)
    │   └───slf4j (slf4j shaded lib directory)
    └───redis (jedis shaded lib directory)

My current pom.xml: https://paste.lucko.me/fgMSBhCtpM

Thanks in advance.

J Fabian Meier

No.

The structure of the JAR needs to follow the names of the packages.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How do I put all required JAR files in a library folder inside the final JAR file with Maven?

From Java

How to put all dependencies in separate folder for runnable jar?

From Java

How to produce an executable jar file with all maven dependencies?

From Java

How can I create an executable jar without dependencies using Maven?

From Java

How can I create an executable JAR with dependencies using Maven?

From Dev

How can I create an executable/runnable JAR with dependencies using Maven?

From Java

Export maven as jar file with all dependencies

From Java

How can I get a resource "Folder" from inside my jar File?

From Dev

How many folders can I put in one Windows folder?

From Dev

How can I run all tests that are inside a folder in Protractor without adding it as a suite to the config file

From Java

How to include maven dependencies in a jar file?

From Java

How can I include a folder in the jar produced by Maven (not the content of the folder, the actual folder)

From

How can I put a tar file inside tar file in golang

From Dev

How can I read a file from a folder and put it as attachment

From Dev

How can I put one or multiple echo inside other echo?

From Dev

How can I read a file present inside resource folder in spring boot application, using IDE as well as Java -jar command?

From Dev

How do I create a Netbeans style Jar with all dependencies in a lib folder?

From Dev

How to create a jar with Maven that includes dependencies in a separate folder for each dependency

From Dev

How can I delete a particular if statement in shell script file and do the same for all files of all folders inside a single folder

From Dev

How can I put .bak file inside my Android Application?

From Dev

How can I create a runnable JAR file with Maven + JavaFX

From Dev

How can I put all includes on one page with classes?

From Dev

How can I put one label with time on all of my screens

From Dev

Maven not adding all dependencies to jar

From Dev

How can I automate creating a folder, subfolders, and an empty file inside?

From Dev

How can i download file inside app folder ?[ after packaging ]

From Dev

How can I delete a php file inside a folder?

From Dev

How can I load a file from inside a jar in a static way?

From Dev

Maven building a jar with dependencies unpacked inside the JAR

Related Related

  1. 1

    How do I put all required JAR files in a library folder inside the final JAR file with Maven?

  2. 2

    How to put all dependencies in separate folder for runnable jar?

  3. 3

    How to produce an executable jar file with all maven dependencies?

  4. 4

    How can I create an executable jar without dependencies using Maven?

  5. 5

    How can I create an executable JAR with dependencies using Maven?

  6. 6

    How can I create an executable/runnable JAR with dependencies using Maven?

  7. 7

    Export maven as jar file with all dependencies

  8. 8

    How can I get a resource "Folder" from inside my jar File?

  9. 9

    How many folders can I put in one Windows folder?

  10. 10

    How can I run all tests that are inside a folder in Protractor without adding it as a suite to the config file

  11. 11

    How to include maven dependencies in a jar file?

  12. 12

    How can I include a folder in the jar produced by Maven (not the content of the folder, the actual folder)

  13. 13

    How can I put a tar file inside tar file in golang

  14. 14

    How can I read a file from a folder and put it as attachment

  15. 15

    How can I put one or multiple echo inside other echo?

  16. 16

    How can I read a file present inside resource folder in spring boot application, using IDE as well as Java -jar command?

  17. 17

    How do I create a Netbeans style Jar with all dependencies in a lib folder?

  18. 18

    How to create a jar with Maven that includes dependencies in a separate folder for each dependency

  19. 19

    How can I delete a particular if statement in shell script file and do the same for all files of all folders inside a single folder

  20. 20

    How can I put .bak file inside my Android Application?

  21. 21

    How can I create a runnable JAR file with Maven + JavaFX

  22. 22

    How can I put all includes on one page with classes?

  23. 23

    How can I put one label with time on all of my screens

  24. 24

    Maven not adding all dependencies to jar

  25. 25

    How can I automate creating a folder, subfolders, and an empty file inside?

  26. 26

    How can i download file inside app folder ?[ after packaging ]

  27. 27

    How can I delete a php file inside a folder?

  28. 28

    How can I load a file from inside a jar in a static way?

  29. 29

    Maven building a jar with dependencies unpacked inside the JAR

HotTag

Archive