Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[m2e-dev] War overlays alternative

Hi all,

regarding war overlays, we have some minor problems, which is really related to WTP itself, not m2e-wtp. This is addressed in a server publish configuration, and in a resource change listener to call server's publish on resource change.

But we have faced a much bigger problem, which is also related (I think) to WTP. Somehow, if server is in autopublish mode, some overlaid resources are deleted. Just editing a .js file, saving it, the server publishes it, but suddenly, the whole webapp is broken. Only a clean on the server can resolve the problem, a simple publish won't fix the missing resources.

And as tomcat server adapter cannot handle m2e-wtp consumed references in "serve modules without publishing" configuration (https://issues.sonatype.org/browse/MECLIPSEWTP-164) (as we trying to avoid publishing now), I've just created an alternative way of configuring overlays using linked folders: https://github.com/vazul/m2eclipse-wtp/commits/overlays_alternative

I'm just wondering, if you review it, it can be part of the main m2e-wtp source. There is a flag in Maven WTP Integration preferences page to switch between the two modes.

It has some drawbacks: cannot handle excludes and includes. War overlay artifacts not present in workspace exploded without web.xml and WEB-INF/lib content, but nothing more (well this can be handled on project level, but we decided to extract war overlay artifacts under the plugin's state location... maybe not a good decision). Well it fits for us... with lots of overlays.

We are also just testing this configuration, but I'm curious about your opinion.

Best regards,

Vazul


Back to the top