Plugin Documentation

Goals available for this plugin:

Goal Description
jboss-as:add-resource Adds a resource If force is set to false and the resource has already been deployed to the server, an error will occur and the operation will fail. Note: this currently only works with adding resources to subsystems when your server is running in domain mode.
jboss-as:deploy 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.
jboss-as:deploy-artifact Deploys an arbitrary artifact to the JBoss application server
jboss-as:deploy-only Deploys only the application to the JBoss Application Server without first invoking the the execution of the lifecycle phase 'package' prior to executing itself. 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.
jboss-as:execute-commands Execute commands to the running JBoss Application Server. Commands should be formatted in the same manor CLI commands are formatted. Executing commands in a batch will rollback all changes if one command fails.
     <execute-commands>
         <batch>true</batch>
         <commands>
             <command>/subsystem=logging/console=CONSOLE:write-attribute(name=level,value=DEBUG)</command>
         </commands>
     </execute-commands>
jboss-as:help Display help information on jboss-as-maven-plugin.
Call mvn jboss-as:help -Ddetail=true -Dgoal=<goal-name> to display parameter details.
jboss-as:redeploy Redeploys the application to the JBoss Application Server.
jboss-as:redeploy-only Redeploys only the application to the JBoss Application Server without first invoking the the execution of the lifecycle phase 'package' prior to executing itself.
jboss-as:run Starts a standalone instance of JBoss Application Server 7 and deploys the application to the server. This goal will block until cancelled or a shutdown is invoked from a management client.
jboss-as:shutdown Shuts down a running JBoss Application Server. Can also be used to issue a reload instead of a full shutdown.
jboss-as:start Starts a standalone instance of JBoss Application Server 7. The purpose of this goal is to start a JBoss Application Server for testing during the maven lifecycle. This can start a remote server, but the server will be shutdown when the maven process ends.
jboss-as:undeploy Undeploys the application to the JBoss Application Server.
jboss-as:undeploy-artifact Undeploys (removes) an arbitrary artifact to the JBoss application server

System Requirements

The following specifies the minimum requirements to run this Maven plugin:

Maven 2.0
JDK Default target for maven-compiler-plugin version 3.0
Memory No minimum requirement.
Disk Space No minimum requirement.

Usage

You should specify the version in your project's plugin configuration:

<project>
  ...
  <build>
    <!-- To define the plugin version in your parent POM -->
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.jboss.as.plugins</groupId>
          <artifactId>jboss-as-maven-plugin</artifactId>
          <version>7.9.Final</version>
        </plugin>
        ...
      </plugins>
    </pluginManagement>
    <!-- To use the plugin goals in your POM or parent POM -->
    <plugins>
      <plugin>
        <groupId>org.jboss.as.plugins</groupId>
        <artifactId>jboss-as-maven-plugin</artifactId>
        <version>7.9.Final</version>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

For more information, see "Guide to Configuring Plug-ins"