I'm having a problem in which I have a few third-party jars that I'm including in my project, and the third-party jars all have identically-named config files in the root directory of the jar file. When I execute mvn package
to construct one jar (for deployment) using maven-assembly-plugin
, the resulting jar file only contains one config file in the root directory, and it has the contents of just one of the config files. Then, when I run my application from the "super jar", errors occur due to the missing configs. I thought using maven-shade-plugin
would help, since it appeared that it supported concatenating such files, but this approach didn't work (the conflicting files were not appended, and moreover I received new warnings about duplicate imports of apache commons libraries that didn't occur before).
What is the best way to handle this in the most automatic and maintainable way?