I have two Maven modules, A and B. A is a dependency of B. Both modules have a resource file named default.properti
I know this is 3 years old but I had the same problem and this is the closest question I found, but still without correct answer so maybe someone will find it useful.
Example maven-assembly descriptor based on jar-with-dependencies (fixes overriding of log4j.properties by dependencies):
jar-with-dependencies
jar
false
/
false
true
log4j.properties
runtime
${project.build.outputDirectory}
/
The key is to provide different rules for dependencies and the actual project (top of hierarchy). Those can be split by using and providing separate rules in fileSets for the project. Otherwise none of log4j.properties would be packed, including the top one.