} catch (IOException e) {
throw new MojoExecutionException("Problem while reading from " + webXml);
} catch (SAXException e) {
throw new MojoExecutionException("Problem while parsing " + webXml);
}
WebXmlRewriter webXmlRewriter = new WebXmlRewriter(
ReloadingServlet.class.getName(),
ReloadingListener.class.getName(),
ReloadingServletFilter.class.getName(), false);
if (webXmlRewriter.rewrite(webXmlDocument)) {
// save web.xml
try {
if (this.getLog().isDebugEnabled()) {
this.getLog().debug("Rewriting web.xml: " + webXml);
}