I am working on a maven project with a war external dependency (let's call this war dependency WAR-DEP)
After the build and during the package phase I am taking the content of WAR-DEP and merging it with the content of the current build using the overlay feature of the maven-war plugin.
In WAR-DEP we have some required jars in it's WEB-INF/lib folder so with the overlay we end up getting everything we need in our final war but our problem started when the project providing us with the WAR-DEP war added a new folder in the WEB-INF/lib-new and moved some of the jars we had before in the WEB-INF/lib folder to this new folder WEB-INF/lib-new.
After building with this new version of the WAR-DEP the overlay worked as expected so we ended up having two folders in the WEB-INF (lib and lib-new) and our application stopped working since this WEB-INF/lib-new is not recognized by tomcat server. So without changing the classpath on tomcat side is there a way I can move the content of lib-new into the lib folder before generating the war ? I mean for example during the overlay but I am not sure how to do this. Thanks for your inputs.
maven-war-plugindoes not have required functionality, howevermaven-dependency-pluginmay help, smth. like: