Package org.codehaus.cargo.module.application

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


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


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

    {  
        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(WebXmlUtils.getServlet(webXml, "ServletRedirector"));
    }
View Full Code Here

    {
        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

        currentFiles.setSrc(this.srcFile);
        currentFiles.createExclude().setName("META-INF/application.xml");
        addZipfileset(currentFiles);
       
        // cactify the application.xml
        ApplicationXml appXml = null;
        try
        {
            appXml = getOriginalApplicationXml();
        }
        catch (JDOMException e)
View Full Code Here

    {  
        executeTestTarget();
       
        File destFile = getProject().resolveFile("work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile);
        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

    {
        executeTestTarget();

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

        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

     *
     * @return the application.xml from the source ear
     */
    private ApplicationXml getOriginalApplicationXml()
    {
        ApplicationXml appXml = null;
        try
        {
            EarArchive ear = new DefaultEarArchive(this.srcFile);
            appXml = ear.getApplicationXml();
            if (appXml == null)
View Full Code Here

    private void addEjbReferencesToWar(File theWar)
    {
        try
        {
            EarArchive ear = new DefaultEarArchive(srcFile);
            ApplicationXml appXml = ear.getApplicationXml();
            Iterator ejbModules = appXml.getEjbModules();
            while (ejbModules.hasNext())
            {
                String module = (String) ejbModules.next();
                EjbArchive ejbArchive = ear.getEjbModule(module);
                EjbJarXml descr = ejbArchive.getEjbJarXml();
View Full Code Here

TOP

Related Classes of org.codehaus.cargo.module.application.ApplicationXml

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.