Package org.codehaus.cargo.module.webapp

Examples of org.codehaus.cargo.module.webapp.WebXmlMerger


        {
            try
            {
                WebXml parsedMergeWebXml = WebXmlIo.parseWebXmlFromFile(
                    this.mergeWebXml, this.xmlCatalog);
                WebXmlMerger merger = new WebXmlMerger(theWebXml);
                merger.setMonitor(new AntMonitor(this));
                merger.merge(parsedMergeWebXml);
            }
            catch (IOException e)
            {
                throw new BuildException(
                    "Could not merge deployment descriptors", e);
View Full Code Here


                {
                    WebXml srcWebXml = WebXmlIo.parseWebXmlFromFile(
                        this.srcFile, this.xmlCatalog);
                    WebXml mergeWebXml = WebXmlIo.parseWebXmlFromFile(
                        this.mergeFile, this.xmlCatalog);
                    WebXmlMerger merger = new WebXmlMerger(srcWebXml);
                    merger.setMonitor(new AntMonitor(this));
                    merger.merge(mergeWebXml);
                    WebXmlIo.writeWebXml(srcWebXml, this.destFile,
                        this.encoding, this.indent);
                }
                else
                {
View Full Code Here

        {
            try
            {
                WebXml parsedMergeWebXml = WebXmlIo.parseWebXmlFromFile(
                    this.mergeWebXml, this.xmlCatalog);
                WebXmlMerger merger = new WebXmlMerger(theWebXml);
                merger.setLogger(new AntLogger(this));
                merger.merge(parsedMergeWebXml);
            }
            catch (IOException e)
            {
                throw new BuildException(
                    "Could not merge deployment descriptors", e);
View Full Code Here

                {
                    WebXml srcWebXml = WebXmlIo.parseWebXmlFromFile(
                        this.srcFile, this.xmlCatalog);
                    WebXml mergeWebXml = WebXmlIo.parseWebXmlFromFile(
                        this.mergeFile, this.xmlCatalog);
                    WebXmlMerger merger = new WebXmlMerger(srcWebXml);
                    merger.setLogger(new AntLogger(this));
                    merger.merge(mergeWebXml);
                    WebXmlIo.writeDescriptor(srcWebXml, this.destFile,
                        this.encoding, this.indent);
                }
                else
                {
View Full Code Here

            + "    <filter-name>f1</filter-name>"
            + "    <filter-class>fclass1</filter-class>"
            + "  </filter>"
            + "</web-app>";
        WebXml mergeWebXml = WebXmlIo.parseWebXml(new ByteArrayInputStream(mergeXml.getBytes()), null);
        WebXmlMerger merger = new WebXmlMerger(srcWebXml);
        merger.merge(mergeWebXml);
        assertTrue(srcWebXml.hasFilter("f1"));
    }
View Full Code Here

            + "  </context-param>"
            + "</web-app>";
        Document mergeDoc =
            builder.parse(new ByteArrayInputStream(mergeXml.getBytes()));
        WebXml mergeWebXml = new WebXml(mergeDoc);
        WebXmlMerger merger = new WebXmlMerger(srcWebXml);
        merger.merge(mergeWebXml);
        assertTrue(srcWebXml.hasContextParam("param"));
    }
View Full Code Here

            + "  </filter>"
            + "</web-app>";
        Document mergeDoc =
            builder.parse(new ByteArrayInputStream(mergeXml.getBytes()));
        WebXml mergeWebXml = new WebXml(mergeDoc);
        WebXmlMerger merger = new WebXmlMerger(srcWebXml);
        merger.merge(mergeWebXml);
        assertTrue(srcWebXml.hasFilter("f1"));
        assertTrue(srcWebXml.hasFilter("f2"));
    }
View Full Code Here

            + "  </context-param>"
            + "</web-app>";
        Document mergeDoc =
            builder.parse(new ByteArrayInputStream(mergeXml.getBytes()));
        WebXml mergeWebXml = new WebXml(mergeDoc);
        WebXmlMerger merger = new WebXmlMerger(srcWebXml);
        merger.merge(mergeWebXml);
        assertTrue(srcWebXml.hasContextParam("param1"));
        assertTrue(srcWebXml.hasContextParam("param2"));
    }
View Full Code Here

        WebXml srcWebXml = new WebXml(srcDoc);
        String mergeXml = srcXml;
        Document mergeDoc =
            builder.parse(new ByteArrayInputStream(mergeXml.getBytes()));
        WebXml mergeWebXml = new WebXml(mergeDoc);
        WebXmlMerger merger = new WebXmlMerger(srcWebXml);
        merger.merge(mergeWebXml);
        assertTrue(srcWebXml.hasFilter("f1"));
    }
View Full Code Here

        WebXml srcWebXml = new WebXml(srcDoc);
        String mergeXml = srcXml;
        Document mergeDoc =
            builder.parse(new ByteArrayInputStream(mergeXml.getBytes()));
        WebXml mergeWebXml = new WebXml(mergeDoc);
        WebXmlMerger merger = new WebXmlMerger(srcWebXml);
        merger.merge(mergeWebXml);
        assertTrue(srcWebXml.hasContextParam("param"));
    }
View Full Code Here

TOP

Related Classes of org.codehaus.cargo.module.webapp.WebXmlMerger

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.