My web application is organised as a multi module Maven project. There are multiple submodules building individual jars and the "main" WAR module has the former as dependencies. The web application loads its resources from the file system. Packaging them as java resources into the jars themselves is not an option. My plan is to deploy two artifacts into the repository where they will be picked up from for the installation into various environments. The war file will be deployed to Tomcat and the zipped or tarred/gzipped resources will be unpacked into the appropriate location on the server.
The additional complication is that multiple jar sub-modules can contribute to the resource bundle. I can extract them all into a common subdirectory during the build using maven-resources-plugin but how do I deploy them into the repository after all sub-modules are processed? Or am I on a wrong track with using this plugin?
As if that was not enough, I need the same jars that went into the WAR to be included into this resource artifact. The reason for that are jobs that run on regular bases automatically and it is not practical to use the jars from exploded WAR under Tomcat's application directory.
I was able to solve this using maven-assembly-plugin instead of maven-resource-plugin in my initial attempt.