Package org.jboss.as.plugin.common

Examples of org.jboss.as.plugin.common.DeploymentFailureException


    @Override
    public void validate() throws DeploymentFailureException {
        super.validate();
        if (artifactId == null) {
            throw new DeploymentFailureException("undeploy-artifact must specify the artifactId");
        }
        if (groupId == null) {
            throw new DeploymentFailureException("undeploy-artifact must specify the groupId");
        }
        @SuppressWarnings("unchecked")
        final Set<Artifact> dependencies = project.getArtifacts();
        Artifact artifact = null;
        for (final Artifact a : dependencies) {
            if (a.getArtifactId().equals(artifactId) &&
                    a.getGroupId().equals(groupId)) {
                artifact = a;
                break;
            }
        }
        if (artifact == null) {
            throw new DeploymentFailureException("Could not resolve artifact to deploy %s:%s", groupId, artifactId);
        }
        file = artifact.getFile();
    }
View Full Code Here


                    }
                    case SUCCESS:
                        break;
                }
            } else {
                throw new DeploymentFailureException("Cannot deploy to a server that is not running.");
            }
            while (server.isRunning()) {
            }
        } catch (Exception e) {
            throw new MojoExecutionException("The server failed to start", e);
View Full Code Here

            for (String serverGroupName : domain.getServerGroups()) {
                groupDeploymentBuilder = (groupDeploymentBuilder == null ? completeBuilder.toServerGroup(serverGroupName) :
                        groupDeploymentBuilder.toServerGroup(serverGroupName));
            }
            if (groupDeploymentBuilder == null) {
                throw new DeploymentFailureException("No server groups were defined for the deployment.");
            }
            return groupDeploymentBuilder.build();
        }
        throw new IllegalStateException(String.format("Invalid type '%s' for deployment", type));
    }
View Full Code Here

            // Check the servers
            for (ServerIdentity serverId : statuses.keySet()) {
                if (serverGroup.equals(serverId.getServerGroupName())) {
                    ServerStatus currentStatus = statuses.get(serverId);
                    if (currentStatus != ServerStatus.STARTED) {
                        throw new DeploymentFailureException("Status of server group '%s' is '%s', but is required to be '%s'.",
                                        serverGroup, currentStatus, ServerStatus.STARTED);
                    }
                    notFound = false;
                    break;
                }
            }
            if (notFound) {
                throw new DeploymentFailureException("Server group '%s' does not exist on the server.", serverGroup);
            }
        }
    }
View Full Code Here

                    }
                    case SUCCESS:
                        break;
                }
            } else {
                throw new DeploymentFailureException("Cannot deploy to a server that is not running.");
            }
            while (server.isRunning()) {
                TimeUnit.SECONDS.sleep(1L);
            }
            server.stop();
View Full Code Here

TOP

Related Classes of org.jboss.as.plugin.common.DeploymentFailureException

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.