JBoss AS7 Deployment Plugin 7.0.0.CR1

org.jboss.as.plugin.deployment
Class Redeploy

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jboss.as.plugin.deployment.Redeploy
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

public final class Redeploy
extends org.apache.maven.plugin.AbstractMojo

Redeploys the archived result of the project to the application server.

Example Usage: <build> <plugins> ... <plugin> <groupId>org.jboss.as.plugins</groupId> <artifactId>jboss-as-maven-plugin</artifactId> <version>${jboss-as-maven-plugin-version}</version> <executions> <execution> <phase>package</phase> <goals> <goal>redeploy</goal> </goals> </execution> </executions> </plugin> ... </plugins> </build>

Author:
James R. Perkins

Field Summary
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
Redeploy()
           
 
Method Summary
protected  org.jboss.as.controller.client.ModelControllerClient client()
          Creates a model controller client.
 org.jboss.as.controller.client.helpers.standalone.DeploymentPlan createPlan(org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder builder)
          Creates the deployment plan.
protected  boolean deploymentExists()
          Checks to see if the deployment exists.
 void execute()
           
 File file()
          The archive file.
 String filename()
          The file name of the archive not including the directory.
 boolean force()
          Returns true if force is enabled, otherwise false.
 String goal()
          The goal of the deployment.
protected  InetAddress hostAddress()
          Creates gets the address to the host name.
 String hostname()
          The hostname to deploy the archive to.
 String name()
          The deployment name.
protected  String nameDefinedMessage()
          A message indicating the name has been defined and will be used.
protected  String nameNotDefinedMessage()
          A message indicating the name has not been defined.
 int port()
          The port number of the server to deploy to.
 File targetDirectory()
          The target directory the archive is located.
 
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
 

Constructor Detail

Redeploy

public Redeploy()
Method Detail

createPlan

public org.jboss.as.controller.client.helpers.standalone.DeploymentPlan createPlan(org.jboss.as.controller.client.helpers.standalone.DeploymentPlanBuilder builder)
                                                                            throws IOException,
                                                                                   org.apache.maven.plugin.MojoFailureException
Creates the deployment plan.

Parameters:
builder - the builder used to create the deployment plan.
Returns:
the deployment plan.
Throws:
IOException - if the deployment plan cannot be created.
org.apache.maven.plugin.MojoFailureException

goal

public String goal()
The goal of the deployment.

Returns:
the goal of the deployment.

name

public final String name()
The deployment name. The default is null.

Returns:
the deployment name, otherwise null.

hostname

public final String hostname()
The hostname to deploy the archive to. The default is localhost.

Returns:
the hostname of the server.

port

public final int port()
The port number of the server to deploy to. The default is 9999.

Returns:
the port number to deploy to.

force

public final boolean force()
Returns true if force is enabled, otherwise false.

Returns:
true if force is enabled, otherwise false.

targetDirectory

public final File targetDirectory()
The target directory the archive is located. The default is project.build.directory.

Returns:
the target directory the archvie is located.

filename

public final String filename()
The file name of the archive not including the directory. The default is project.build.finalName + . + project.packaging

Returns:
the file name of the archive.

file

public final File file()
The archive file.

Returns:
the archive file.

hostAddress

protected final InetAddress hostAddress()
                                 throws UnknownHostException
Creates gets the address to the host name.

Returns:
the address.
Throws:
UnknownHostException - if the host name was not found.

client

protected final org.jboss.as.controller.client.ModelControllerClient client()
                                                                     throws UnknownHostException
Creates a model controller client.

Returns:
the client.
Throws:
UnknownHostException - if the host name does not exist.

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

deploymentExists

protected final boolean deploymentExists()
                                  throws IOException
Checks to see if the deployment exists.

Returns:
true if the deployment exists, false if the deployment does not exist or cannot be determined.
Throws:
IOException - if an error occurred.

nameNotDefinedMessage

protected String nameNotDefinedMessage()
A message indicating the name has not been defined.

Returns:
the message.

nameDefinedMessage

protected String nameDefinedMessage()
A message indicating the name has been defined and will be used.

Returns:
the message.

JBoss AS7 Deployment Plugin 7.0.0.CR1

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.