Examples of EarArchive


Examples of org.apache.cactus.integration.ant.deployment.EarArchive

        try
        {
            deployable.setFile(theDeployableFile);

            EarArchive earArchive = new DefaultEarArchive(theDeployableFile);
            String webUri = getUriOfCactifiedWebModule(earArchive);
            if (webUri == null)
            {
                throw new BuildException("Could not find cactified web "
                    + "module in the [" + theDeployableFile + "] EAR.");
            }

            WarArchive warArchive = earArchive.getWebModule(webUri);
            if (warArchive == null)
            {
                throw new BuildException("Could not find the WAR [" + webUri
                    + "] in the [" + theDeployableFile + "] EAR.");
            }
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.EarArchive

                    contextPath = contextPath.substring(0, warIndex);
                }
            }
            else
            {
                EarArchive ear = new EarArchive(this.earFile);
                String webUri = getUriOfCactifiedWebModule(ear);
                if (webUri == null)
                {
                    throw new BuildException("Could not find cactified web "
                        + "module in the EAR");
                }
                war = ear.getWebModule(webUri);
                if (war == null)
                {
                    throw new BuildException("Could not find the WAR " + webUri
                        + " in the EAR");
                }
                contextPath =
                    ear.getApplicationXml().getWebModuleContextRoot(webUri);
            }
            addRedirectorNameProperties(war);
        }
        catch (SAXException e)
        {
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.EarArchive

        try
        {
            deployable.setFile(theDeployableFile);

            EarArchive earArchive = new DefaultEarArchive(theDeployableFile);
            String webUri = getUriOfCactifiedWebModule(earArchive);
            if (webUri == null)
            {
                throw new BuildException("Could not find cactified web "
                    + "module in the [" + theDeployableFile + "] EAR.");
            }

            WarArchive warArchive = earArchive.getWebModule(webUri);
            if (warArchive == null)
            {
                throw new BuildException("Could not find the WAR [" + webUri
                    + "] in the [" + theDeployableFile + "] EAR.");
            }
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.application.EarArchive

        try
        {
            deployable.setFile(theDeployableFile);

            EarArchive earArchive = new DefaultEarArchive(theDeployableFile);
            String webUri = getUriOfCactifiedWebModule(earArchive);
            if (webUri == null)
            {
                throw new BuildException("Could not find cactified web "
                    + "module in the [" + theDeployableFile + "] EAR.");
            }

            WarArchive warArchive = earArchive.getWebModule(webUri);
            if (warArchive == null)
            {
                throw new BuildException("Could not find the WAR [" + webUri
                    + "] in the [" + theDeployableFile + "] EAR.");
            }
View Full Code Here

Examples of org.apache.cactus.integration.ant.deployment.application.EarArchive

        try
        {
            deployable.setFile(theDeployableFile);

            EarArchive earArchive = new DefaultEarArchive(theDeployableFile);
            String webUri = getUriOfCactifiedWebModule(earArchive);
            if (webUri == null)
            {
                throw new BuildException("Could not find cactified web "
                    + "module in the [" + theDeployableFile + "] EAR.");
            }

            WarArchive warArchive = earArchive.getWebModule(webUri);
            if (warArchive == null)
            {
                throw new BuildException("Could not find the WAR [" + webUri
                    + "] in the [" + theDeployableFile + "] EAR.");
            }
View Full Code Here

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

    private ApplicationXml getOriginalApplicationXml()
    {
        ApplicationXml appXml = null;
        try
        {
            EarArchive ear = new DefaultEarArchive(this.srcFile);
            appXml = ear.getApplicationXml();
            if (appXml == null)
            {
                throw new BuildException("The EAR source file does not "
                    + "contain a META-INF/application.xml "
                    + "deployment descriptor");
View Full Code Here

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

     */
    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();
                VendorEjbDescriptor vendorDescr = descr.getVendorDescriptor();
                if (vendorDescr == null)
                {
                    throw new BuildException("Failed to find vendor "
View Full Code Here

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

    public void testCanAddCactifiedWar() throws Exception
    {  
        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.EarArchive

    public void testCustomCactusWarContext() throws Exception
    {
        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.EarArchive

    public void testAddEjbReferences() throws Exception
    {
        executeTestTarget();
       
        File destFile = getProject().resolveFile("target/work/cactified.ear");
        EarArchive destEar = new DefaultEarArchive(destFile.getAbsolutePath());
        WarArchive cactusWar = destEar.getWebModule("cactus.war");
       
        // test web.xml
        WebXml webXml = cactusWar.getWebXml();
        Iterator i = webXml.getElements(WebXmlTag.EJB_LOCAL_REF);
        assertEjbRef((Element) i.next(), "ejb/Session2", "Session",
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.