JBoss AS7 Deployment Plugin 7.7.Final

org.jboss.as.plugin.deployment
Class Deploy

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jboss.as.plugin.common.AbstractServerMojo
          extended by org.jboss.as.plugin.deployment.Deploy
All Implemented Interfaces:
Closeable, org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, ConnectionInfo
Direct Known Subclasses:
Run

@Mojo(name="deploy",
      requiresDependencyResolution=RUNTIME,
      threadSafe=true)
@Execute(phase=PACKAGE)
public class Deploy
extends AbstractServerMojo

Deploys the application to the JBoss Application Server.

If 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.

Author:
James R. Perkins

Field Summary
protected  String name
          Specifies the name used for the deployment.
protected  org.apache.maven.project.MavenProject project
           
 
Fields inherited from class org.jboss.as.plugin.common.AbstractServerMojo
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
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
Deploy()
           
 
Method Summary
protected  void doExecute()
          Executes additional processing.
 void execute()
           
protected  Deployment.Status executeDeployment(org.jboss.as.controller.client.ModelControllerClient client, Deployment deployment)
           
protected  File file()
          The archive file.
protected  String getMatchPattern()
          Returns the matching pattern for undeploy and redeploy goals.
protected  MatchPatternStrategy getMatchPatternStrategy()
          Returns the matching pattern strategy to use if more than one deployment matches the pattern returns more than one instance of a deployment.
protected  org.jboss.as.plugin.deployment.PackageType getPackageType()
           
 Deployment.Type getType()
          The type of the deployment.
 String goal()
          The goal of the deployment.
protected  void validate()
          Validates the deployment.
 
Methods inherited from class org.jboss.as.plugin.common.AbstractServerMojo
close, getCallbackHandler, getClient, getHostAddress, getPort, hostname, isDomainServer, isSkip
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

project

@Parameter(defaultValue="${project}",
           readonly=true,
           required=true)
protected org.apache.maven.project.MavenProject project

name

@Parameter
protected String name
Specifies the name used for the deployment. Note that the name should end in a valid deployment extension.

Examples:

Constructor Detail

Deploy

public Deploy()
Method Detail

goal

public String goal()
The goal of the deployment.

Returns:
the goal of the deployment.

getType

public Deployment.Type getType()
The type of the deployment.

Returns:
the deployment type.

doExecute

protected void doExecute()
                  throws org.apache.maven.plugin.MojoExecutionException,
                         org.apache.maven.plugin.MojoFailureException
Executes additional processing.

Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
See Also:
execute()

file

protected File file()
The archive file.

Returns:
the archive file.

getPackageType

protected final org.jboss.as.plugin.deployment.PackageType getPackageType()

execute

public final void execute()
                   throws org.apache.maven.plugin.MojoExecutionException,
                          org.apache.maven.plugin.MojoFailureException
Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException

executeDeployment

protected final Deployment.Status executeDeployment(org.jboss.as.controller.client.ModelControllerClient client,
                                                    Deployment deployment)
                                             throws DeploymentExecutionException,
                                                    DeploymentFailureException,
                                                    IOException
Throws:
DeploymentExecutionException
DeploymentFailureException
IOException

getMatchPattern

protected String getMatchPattern()
Returns the matching pattern for undeploy and redeploy goals. By default null is returned.

Returns:
the pattern or null

getMatchPatternStrategy

protected MatchPatternStrategy getMatchPatternStrategy()
Returns the matching pattern strategy to use if more than one deployment matches the pattern returns more than one instance of a deployment. By default null is returned.

Returns:
the matching strategy or null

validate

protected void validate()
                 throws DeploymentFailureException
Validates the deployment.

Throws:
DeploymentFailureException - if the deployment is invalid.

JBoss AS7 Deployment Plugin 7.7.Final

Copyright © 2015 JBoss by Red Hat. All Rights Reserved.