Building a Quarkus based webapp, I encounter the following issue:
I have dependencies managed by maven, resolved as jars.
When building a fast-jar, the dependencies are collected into the targetquarkus-applibmain directory.
This works without issues.
When building a Uber-Jar, Quarkus unpacks the individual jars, and stores the content of all dependencies jars directly into the Uber-Jar instead.
Some of the dependencies have xml configuration files with the same name, at the same relative path relative to their original jar, which cannot be merged.
ex:
dependency1.jar!metainfo/config.xml
dependency2.jar!metainfo/config.xml
As a result, I’m getting a build warning:
[WARNING] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Dependencies with duplicate files detected. The dependencies [redacted] contain duplicate files, e.g. metainfo/config.xml
and only one of the dependencies’s file are copied into the resulting jar.
I’ve reviewed the solutions proposed in this question:
in Quarkus, can I merge files that have the same name in many dependencies, ie typesafe config files?
but this is not suitable here, since the config files cannot be merged into a single config.xml
I’ve looked for configuration switches to bundle the full jars into the resulting fat jar instead of unpacking them, but I haven’t found one so far.
My goal is to create a single executable jar (fast-jar doesn’t feel that role, since it needs the additional lib folder to run), but without unpacking the dependencies (which causes issues with the libraries).