I have this setting now:
Project A displays a military file - it has a configuration file (WEB-INF / web.xml). We deliver this using a commented configuration section, which is unpacked manually when the project is deployed in a specific environment.
The needs of the project have changed - and I need Project A to be built without this part of the configuration as a whole; and I need another project (Project B) that will be built with this configuration section (enabled, not commented out).
Instead of having the file exist in both projects (dual maintenance), I was hoping that project B depended on project A (via a military overlay), and then use the maven-config-processor plugin to add my special config to WEB-INF / web .xml, then repackage the war file.
This does not work, though - a configuration modification may work if the target already exists (i.e., after the previous launch), but when I run everything together, overlapping and repacking in a new war happen together - and I can’t figure out how to make the plugin config-processor work in the middle. Basically, the default order ends with a “configuration processor” (which fails because the overlay has not happened yet), then “war” (all as one unit). I can’t make the configuration processor after the overlay, but before the war it was completely packed.
Several people on the Internet over the past few years have asked if there is a way to implement the plugin between the steps “unzip the overlay” and “repack the military file”, but no one seemed to answer this question in any case, Any ideas?
M1EK
source share