Package org.glassfish.embeddable

Examples of org.glassfish.embeddable.Deployer.deploy()


                //deployer.deploy(archive.toURI());
                if (warArchive == null) {
                    LOGGER.info("warArchive is null, nothing deployed");
                } else {
                    LOGGER.info("About to deploy [" + warArchive.toURI().toString() + "] from path ["+warArchive.toURI().getPath()+ "]  to EmbeddedGlassFish instance [" + deployer.toString() + "] with context-root set to [" + this.appDescriptor.getContextPath() + "]");
                    String deployedApp = deployer.deploy(warArchive.toURI());
                    LOGGER.info("Deployed [" + deployedApp + "] to EmbeddedGlassFish instance [" + deployer.toString() + "] with context-root set to [" + this.appDescriptor.getContextPath() + "]");
                }
            } catch (org.glassfish.embeddable.GlassFishException ex) {
                LOGGER.info("Caught GlassFishException ["+ex.getMessage()+ "] trying to start the embedded server instance");
                throw new TestContainerException(ex);
View Full Code Here


        if (app == null) {
            throw new Exception("Application can not be null");
        }
        Deployer deployer = glassfish.getDeployer();
        if (deployParams.size() > 0) {
            deployer.deploy(new File(app).toURI(), deployParams.toArray(new String[0]));
            System.out.println("Deployed [" + app + "] with parameters " + deployParams);
        } else {
            deployer.deploy(new File(app).toURI());
            System.out.println("Deployed [" + app + "]");
        }
View Full Code Here

        Deployer deployer = glassfish.getDeployer();
        if (deployParams.size() > 0) {
            deployer.deploy(new File(app).toURI(), deployParams.toArray(new String[0]));
            System.out.println("Deployed [" + app + "] with parameters " + deployParams);
        } else {
            deployer.deploy(new File(app).toURI());
            System.out.println("Deployed [" + app + "]");
        }
    }

    public static void undeploy(String appName, String serverId) throws Exception {
View Full Code Here

        if (app == null) {
            throw new Exception("Application can not be null");
        }
        Deployer deployer = glassfish.getDeployer();
        if (deployParams.size() > 0) {
            deployer.deploy(new File(app).toURI(), deployParams.toArray(new String[0]));
            System.out.println("Deployed [" + app + "] with parameters " + deployParams);
        } else {
            deployer.deploy(new File(app).toURI());
            System.out.println("Deployed [" + app + "]");
        }
View Full Code Here

        Deployer deployer = glassfish.getDeployer();
        if (deployParams.size() > 0) {
            deployer.deploy(new File(app).toURI(), deployParams.toArray(new String[0]));
            System.out.println("Deployed [" + app + "] with parameters " + deployParams);
        } else {
            deployer.deploy(new File(app).toURI());
            System.out.println("Deployed [" + app + "]");
        }
    }

    public static void undeploy(String appName, String serverId) throws Exception {
View Full Code Here

        URI sampleWarUri = new URI("mvn:org.apache.wicket/wicket-examples/1.5.3/war");
        String sampleAppName = "wicket-examples";

        log.info("deploying " + sampleAppName);
        deployer.deploy(sampleWarUri, "--name", sampleAppName, "--contextroot", sampleAppName);

        log.info("undeploying " + sampleAppName);
        deployer.undeploy(sampleAppName);

        log.info("stopping GlassFish");
View Full Code Here

             */

            File tempFile = File.createTempFile("pax-exam", ".war");
            tempFile.deleteOnExit();
            StreamUtils.copyStream(stream, new FileOutputStream(tempFile), true);
            deployer.deploy(tempFile, "--name", PROBE_APPLICATION_NAME, "--contextroot",
                PROBE_APPLICATION_NAME);
            deployed.push(PROBE_APPLICATION_NAME);
        }
        catch (GlassFishException exc) {
            throw new TestContainerException(exc);
View Full Code Here

            String contextRoot = option.getContextRoot();
            if (contextRoot == null) {
                contextRoot = applicationName;
            }
            Deployer deployer = glassFish.getDeployer();
            deployer.deploy(uri, "--name", applicationName, "--contextroot", applicationName);
            deployed.push(applicationName);
            LOG.info("deployed module {}", url);
        }
        catch (IOException exc) {
            throw new TestContainerException(exc);
View Full Code Here

            throw new Exception("Application can not be null");
        }
        Deployer deployer = glassfish.getDeployer();
        final int len = deployParams.size();
        if (len > 0) {
            deployer.deploy(new File(app).toURI(), deployParams.toArray(new String[len]));
            System.out.println("Deployed [" + app + "] with parameters " + deployParams);
        } else {
            deployer.deploy(new File(app).toURI());
            System.out.println("Deployed [" + app + "]");
        }
View Full Code Here

        final int len = deployParams.size();
        if (len > 0) {
            deployer.deploy(new File(app).toURI(), deployParams.toArray(new String[len]));
            System.out.println("Deployed [" + app + "] with parameters " + deployParams);
        } else {
            deployer.deploy(new File(app).toURI());
            System.out.println("Deployed [" + app + "]");
        }
    }

    public static void undeploy(String appName, String serverId) throws Exception {
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.