Examples of ApplicationXml


Examples of org.codehaus.cargo.module.application.ApplicationXml

            + "  <module>"
            + "    <java>javaclient.jar</java>"
            + "  </module>"
            + "</application>";
        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        ApplicationXml applicationXml = new ApplicationXml(doc);
        Iterator webUris = applicationXml.getWebModuleUris();
        assertTrue("No web modules defined", !webUris.hasNext());
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

            + "      <context-root>/webmodule</context-root>"
            + "    </web>"
            + "  </module>"
            + "</application>";
        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        ApplicationXml applicationXml = new ApplicationXml(doc);
        Iterator webUris = applicationXml.getWebModuleUris();
        assertEquals("webmodule.jar", webUris.next());
        assertTrue(!webUris.hasNext());
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

            + "      <context-root>/webmodule3</context-root>"
            + "    </web>"
            + "  </module>"
            + "</application>";
        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        ApplicationXml applicationXml = new ApplicationXml(doc);
        Iterator webUris = applicationXml.getWebModuleUris();
        assertEquals("webmodule1.jar", webUris.next());
        assertEquals("webmodule2.jar", webUris.next());
        assertEquals("webmodule3.jar", webUris.next());
        assertTrue(!webUris.hasNext());
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

            + "  <module>"
            + "    <java>javaclient.jar</java>"
            + "  </module>"
            + "</application>";
        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        ApplicationXml applicationXml = new ApplicationXml(doc);
        try
        {
            applicationXml.getWebModuleContextRoot("webmodule.jar");
            fail("IllegalArgumentException expected");
        }
        catch (IllegalArgumentException expected)
        {
            // expected
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

            + "      <context-root>/webmodule</context-root>"
            + "    </web>"
            + "  </module>"
            + "</application>";
        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        ApplicationXml applicationXml = new ApplicationXml(doc);
        assertEquals("/webmodule",
            applicationXml.getWebModuleContextRoot("webmodule.jar"));
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

            + "      <context-root>/webmodule3</context-root>"
            + "    </web>"
            + "  </module>"
            + "</application>";
        Document doc = builder.parse(new ByteArrayInputStream(xml.getBytes()));
        ApplicationXml applicationXml = new ApplicationXml(doc);
        assertEquals("/webmodule1",
            applicationXml.getWebModuleContextRoot("webmodule1.jar"));
        assertEquals("/webmodule2",
            applicationXml.getWebModuleContextRoot("webmodule2.jar"));
        assertEquals("/webmodule3",
            applicationXml.getWebModuleContextRoot("webmodule3.jar"));
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

    {  
        executeTestTarget();
       
        File destFile = getProject().resolveFile("target/work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile.getAbsolutePath());
        ApplicationXml appXml = destEar.getApplicationXml();
        assertEquals("/cactus", appXml.getWebModuleContextRoot("cactus.war"));
        WarArchive cactusWar = destEar.getWebModule("cactus.war");
        WebXml webXml = cactusWar.getWebXml();
        assertNotNull(webXml.getServlet("ServletRedirector"));
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

    {
        executeTestTarget();

        File destFile = getProject().resolveFile("target/work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile.getAbsolutePath());
        ApplicationXml appXml = destEar.getApplicationXml();
        assertEquals("/myTestFramework",
            appXml.getWebModuleContextRoot("cactus.war"));
    }
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

        currentFiles.setSrc(this.srcFile);
        currentFiles.createExclude().setName("META-INF/application.xml");
        addZipfileset(currentFiles);
       
        // cactify the application.xml
        ApplicationXml appXml = getOriginalApplicationXml();
        File tmpAppXml = cactifyApplicationXml(appXml);
        setAppxml(tmpAppXml);
       
        // create the cactus war
        File cactusWarFile = createCactusWar();
View Full Code Here

Examples of org.codehaus.cargo.module.application.ApplicationXml

     *
     * @return the application.xml from the source ear
     */
    private ApplicationXml getOriginalApplicationXml()
    {
        ApplicationXml appXml = null;
        try
        {
            EarArchive ear = new DefaultEarArchive(
                new FileInputStream(this.srcFile));
            appXml = ear.getApplicationXml();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.