Note that there are some explanatory texts on larger screens.

plurals
  1. POModifying resources inside a war overlay in maven
    primarykey
    data
    text
    <p>I have this setup currently:</p> <p>Project A outputs a war file - has a configuration file (WEB-INF/web.xml). We've been delivering this with a commented out section of configuration which gets uncommented manually when the project is deployed in a particular environment.</p> <p>Needs of the project have changed - and I need Project A to be built without that section of configuration entirely; and I need another project (Project B) to be built WITH that section of configuration (enabled, not commented out).</p> <p>Rather than having the file exist in both projects (dual maintenance), I had hoped I could have Project B depend on Project A (via war overlay), and then use the maven-config-processor-plugin to add my special config to WEB-INF/web.xml, then re-package the war file.</p> <p>This doesn't seem to work - though - the config modification can work if the target already exists (i.e. after the previous run), but when I run everything together, the overlay and repackaging into the new war happens together - and I can't figure out any way to make the config-processor plugin operate in the middle. Basically, the default order ends up being "config-processor" (which fails because the overlay hasn't happened yet), then "war" (all as one unit). I can't make the config-processor happen after the overlay but before the war is fully packaged. </p> <p>Multiple people on the internets have asked over the last few years if there is a way to inject a plugin in between the "unpack the overlay" and "repack the war file" steps, but nobody has seemingly answered this definitively either way. Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload