Package org.codehaus.cargo.container.deployer

Examples of org.codehaus.cargo.container.deployer.Deployer


        configure(config);
        return containerFactory.createContainer(id, ContainerType.REMOTE, config);
    }

    protected void deploy(DeployerFactory deployerFactory, final BuildListener listener, Container container, File f, String contextPath) {
        Deployer deployer = deployerFactory.createDeployer(container);

        listener.getLogger().println("Deploying " + f + " to container " + container.getName());
        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);
        } else {
            throw new RuntimeException("Extension File Error.");
        }
    }
View Full Code Here


    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;
        int increment = 5;
        while (true) {
            if (isDeployedWarRunning(warPath)) {
View Full Code Here

TOP

Related Classes of org.codehaus.cargo.container.deployer.Deployer

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.