I have configured jetty to run my web application using the jetty maven. Jetty is supposed to be a light alternative for development and therefore it doesn't need all the stuff that is in web.xml. More specifically, I want to remove a filter in web.xml.
I tried to use the overrideDescriptor configuration property, but this only allows me to override the web.xml, not replace it. Therefore, the filter is still there.
Any ideas how I can remove the filter without modifying the original web.xml file?
Since there is no answer, I'll post my solution, which is not perfect.
<!-- Jetty configuration -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.5.v20120716</version>
<configuration>
<webApp>
<descriptor>src/main/webapp/mock-web.xml</descriptor>
[...]
</webApp>
[...]
</configuration>
</plugin>
The downside of this approach is that you have to maintain two almost identical web.xml files. I have not found a solution that will allow me override the original web.xml file and remove a listener.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With