Examples of InitialDeploymentPlanBuilder


Examples of org.jboss.as.controller.client.helpers.domain.InitialDeploymentPlanBuilder

    public String deploy(Archive<?> archive, String target) throws DeploymentException {
        try {
            final InputStream input = archive.as(ZipExporter.class).exportAsInputStream();
            try {
                InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
                DeploymentPlan plan = builder.add(archive.getName(), input).andDeploy().toServerGroup(target).build();
                DeploymentAction deployAction = plan.getDeploymentActions().get(plan.getDeploymentActions().size() - 1);
                return executeDeploymentPlan(plan, deployAction);
            } finally {
                if (input != null)
                    try {
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder

    private void deployModule(String applicationName, InputStream stream) {

        try {
            String warName = applicationName + ".war";
            InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
            DeploymentPlan plan = builder.add(warName, stream).deploy(warName).build();
            ServerDeploymentPlanResult result = deploymentManager.execute(plan).get();
            UUID actionId = plan.getDeploymentActions().get(0).getId();
            ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(actionId);

            if (actionResult.getResult() != Result.EXECUTED) {
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder

            undeployModule(applicationName);
        }
    }

    private void undeployModule(String applName) {
        InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        DeploymentPlan plan = builder.undeploy(applName).andRemoveUndeployed().build();
        ServerDeploymentPlanResult result;
        try {
            result = deploymentManager.execute(plan).get();
        }
        catch (InterruptedException exc) {
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder

            port += offset;
        }
        final ModelControllerClient client = ModelControllerClient.Factory
            .create("localhost", port);
        ServerDeploymentManager deploymentManager = ServerDeploymentManager.Factory.create(client);
        InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        String applName = "wicket-examples1";
        URL applUrl = new URL("mvn:org.apache.wicket/wicket-examples/1.5.3/war");
        DeploymentPlan plan = builder.add(applName, applUrl).andDeploy().build();
        ServerDeploymentPlanResult result = deploymentManager.execute(plan).get();
        UUID actionId = plan.getDeploymentActions().get(0).getId();
        ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));
       
        builder = deploymentManager.newDeploymentPlan();
        plan = builder.undeploy(applName).andRemoveUndeployed().build();
        result = deploymentManager.execute(plan).get();
        actionId = plan.getDeploymentActions().get(0).getId();
        actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));
       
View Full Code Here

Examples of org.jboss.as.controller.client.helpers.standalone.InitialDeploymentPlanBuilder

        System.setProperty("jboss.server.config.dir", "target/test-classes/wildfly80-config");

        final ModelControllerClient client = ModelControllerClient.Factory
            .create("localhost", 19990);
        ServerDeploymentManager deploymentManager = ServerDeploymentManager.Factory.create(client);
        InitialDeploymentPlanBuilder builder = deploymentManager.newDeploymentPlan();
        String applName = "wicket-examples.war";
        URL applUrl = new URL("mvn:org.apache.wicket/wicket-examples/1.5.3/war");
        DeploymentPlan plan = builder.add(applName, applUrl).andDeploy().build();
        ServerDeploymentPlanResult result = deploymentManager.execute(plan).get();
        UUID actionId = plan.getDeploymentActions().get(0).getId();
        ServerDeploymentActionResult actionResult = result.getDeploymentActionResult(actionId);
        assertThat(actionResult.getResult(), is(Result.EXECUTED));
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.