Package org.codehaus.cargo.module.application

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


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


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

    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

     */
    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

TOP

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

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.