@Mojo(name="deploy",
requiresDependencyResolution=RUNTIME,
threadSafe=true)
@Execute(phase=PACKAGE)
public class DeployMojo
extends AbstractServerConnection
force is set to true, the server is queried to see if the application already exists. If the
application already exists, the application is redeployed instead of deployed. If the application does not exist the
application is deployed as normal.
If force is set to false and the application has already been deployed to the server, an error
will occur and the deployment will fail.| Modifier and Type | Field and Description |
|---|---|
protected org.apache.maven.project.MavenProject |
project |
DEBUG_MESSAGE_NO_CREDS, DEBUG_MESSAGE_NO_ID, DEBUG_MESSAGE_NO_SERVER_SECTION, DEBUG_MESSAGE_NO_SETTINGS_FILE, DEBUG_MESSAGE_POM_HAS_CREDS, DEBUG_MESSAGE_SETTINGS_HAS_CREDS, DEBUG_MESSAGE_SETTINGS_HAS_ID, timeout| Constructor and Description |
|---|
DeployMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
afterDeployment(org.jboss.as.controller.client.ModelControllerClient client) |
protected void |
beforeDeployment(org.jboss.as.controller.client.ModelControllerClient client) |
protected Deployment |
createDeployment() |
void |
execute() |
protected DeploymentResult |
executeDeployment(DeploymentManager deploymentManager,
Deployment deployment) |
protected File |
file()
The archive file.
|
String |
goal()
The goal of the deployment.
|
protected boolean |
skipExecution() |
protected void |
validate(boolean isDomain)
Validates the deployment.
|
createClient, getClientConfiguration@Parameter(defaultValue="${project}",
readonly=true,
required=true)
protected org.apache.maven.project.MavenProject project
public String goal()
protected DeploymentResult executeDeployment(DeploymentManager deploymentManager, Deployment deployment) throws IOException
IOExceptionprotected boolean skipExecution()
protected File file()
public final void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void beforeDeployment(org.jboss.as.controller.client.ModelControllerClient client)
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException,
IOException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionIOExceptionprotected void afterDeployment(org.jboss.as.controller.client.ModelControllerClient client)
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException,
IOException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionIOExceptionprotected Deployment createDeployment()
protected void validate(boolean isDomain)
throws MojoDeploymentException
isDomain - true if this is a domain server, otherwise falseMojoDeploymentException - if the deployment is invalidCopyright © 2016 JBoss by Red Hat. All rights reserved.