Package org.codehaus.cargo.container.deployable

Examples of org.codehaus.cargo.container.deployable.WAR


        // (6) Stop the container
        container.stop();
    }

    private WAR getWAR(String context) {
        return new WAR(localRepository + "/org/apache/struts/"
                + context + "/" + version + "/"
                + context + "-" + version + ".war");
    }
View Full Code Here


        deployer.setLogger(new LoggerImpl(listener.getLogger()));


        String extension = FilenameUtils.getExtension(f.getAbsolutePath());
        if ("WAR".equalsIgnoreCase(extension)) {
            WAR war = createWAR(f);
            if (!StringUtils.isEmpty(contextPath)) {
                war.setContext(contextPath);
            }
            deployer.redeploy(war);
        } else if ("EAR".equalsIgnoreCase(extension)) {
            EAR ear = createEAR(f);
            deployer.redeploy(ear);
View Full Code Here

     *
     * @param deployableFile The deployable file to create the Deployable from.
     * @return A Deployable object.
     */
    protected WAR createWAR(File deployableFile) {
        return new WAR(deployableFile.getAbsolutePath());
    }
View Full Code Here

      }
    }
    container.setExtraClasspath(extraClassPath.toArray(new String[extraClassPath.size()]));

    // Finally deploy Sqoop server war file
    configuration.addDeployable(new WAR("../server/target/sqoop.war"));

    // Start Sqoop server
    container.start();
  }
View Full Code Here

     *
     * @param warLocation the war location
     * @return a container ready to start
     */
    protected InstalledLocalContainer getContainer(final String warLocation) {
        Deployable war = new WAR(warLocation);
        LocalConfiguration configuration = new Tomcat6xStandaloneLocalConfiguration(
                "target/tomcat6x");
        configuration.addDeployable(war);
        InstalledLocalContainer webapp = new Tomcat6xInstalledLocalContainer(
                configuration);
View Full Code Here

        // (6) Stop the container
        container.stop();
    }

    private WAR getWAR(String context) {
        return new WAR(localRepository + "/org/apache/struts/"
                + context + "/" + version + "/"
                + context + "-" + version + ".war");
    }
View Full Code Here

     * @throws MalformedURLException
     */
    public void deployWar(String warPath) throws InterruptedException, MalformedURLException {
        System.out.println("deploying war from " + warPath + " please wait...");
        DeployableFactory deployableFac = new DefaultDeployableFactory();
        WAR war = (WAR) deployableFac.createDeployable(container.getId(), warPath, DeployableType.WAR);
        DeployerFactory deployerFac = new DefaultDeployerFactory();
        Deployer deployer = deployerFac.createDeployer(getContainer(), DeployerType.INSTALLED);
        deployer.deploy(war);
        // verify that application has started before exiting method
        int cycles = 0;
View Full Code Here

      }
    }
    container.setExtraClasspath(extraClassPath.toArray(new String[extraClassPath.size()]));

    // Finally deploy Sqoop server war file
    configuration.addDeployable(new WAR("../server/target/sqoop.war"));

    // Start Sqoop server
    container.start();
  }
View Full Code Here

        // (6) Stop the container
        container.stop();
    }

    private WAR getWAR(String context) {
        return new WAR(localRepository + "/org/apache/struts/"
                + context + "/" + version + "/"
                + context + "-" + version + ".war");
    }
View Full Code Here

TOP

Related Classes of org.codehaus.cargo.container.deployable.WAR

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.