# Usage

The ${project.name} is generally used to deploy applications or application artifacts to a running ${appServerName} Application
Server. Each goal can be explicitly executed from the command line or specified in the execution portion of the plugin
in the POM file.

#[[##]]# The `${pluginPrefix}:add-resource` Goal

The `${pluginPrefix}:add-resource` goal adds a resource to the running ${appServerName} Application Server.

For example to add a resource you type the following on the command line:

```
mvn ${pluginPrefix}:add-resource
```

#[[##]]# The `${pluginPrefix}:deploy` Goal

The `${pluginPrefix}:deploy` goal deploys the application to the running ${appServerName} Application Server.

For example to deploy, or redeploy by default, you type the following on the command line:

```
mvn ${pluginPrefix}:deploy
```

#[[##]]# The `${pluginPrefix}:deploy-only` Goal

The `${pluginPrefix}:deploy-only` goal deploys the application to the running ${appServerName}  without executing
any other goals by default.

For example to deploy, or redeploy by default, you type the following on the command line:

```
mvn ${pluginPrefix}:deploy-only
```

#[[##]]# The `${pluginPrefix}:deploy-artifact` Goal

The `${pluginPrefix}:deploy-artifact` goal deploys an arbitrary artifact to the running ${appServerName}.

For example to deploy the arbitrary artifact specified in you POM, you type the following on the command line:

```
mvn ${pluginPrefix}:deploy-artifact
```

#[[##]]# The `${pluginPrefix}:dev` Goal

The `${pluginPrefix}:dev` goal will start ${appServerName} and deploy your application. If the `jboss-home`
property is not set, a server will be provisioned. The source directories will be watched for changes. If a change
occurs, additional Maven goals may be executed before a possible redeploy of your deployment.

For example to run your WAR in development mode, you enter the following on the command line:

```
mvn ${pluginPrefix}:dev
```

#[[##]]# The `${pluginPrefix}:package` Goal

The `${pluginPrefix}:package` goal will provision a server, execute CLI commands and deploy your application.

To execute the package goal type the following on the command line:

```
mvn ${pluginPrefix}:package
```

#[[##]]# The `${pluginPrefix}:provision` Goal

The `${pluginPrefix}:provision` goal will provision a server.

To execute the provision goal type the following on the command line:

```
mvn ${pluginPrefix}:provision
```

#[[##]]# The `${pluginPrefix}:redeploy` Goal

The `${pluginPrefix}:redeploy` goal will redeploy your application if and only if the application has already been
deployed to the application server.

To execute the redeploy goal type the following on the command line:

```
mvn ${pluginPrefix}:redeploy
```

#[[##]]# The `${pluginPrefix}:redeploy-only` Goal

The `${pluginPrefix}:redeploy-only` goal will redeploy your application if and only if the application has already been
deployed to the application server. By default no other goals are invoked.

To execute the redeploy goal type the following on the command line:

```
mvn ${pluginPrefix}:redeploy-only
```

#[[##]]# The `${pluginPrefix}:undeploy` Goal

The `${pluginPrefix}:undeploy` goal will undeploy your application from the from the running application server if the
application has already been deployed.

To execute the undeploy goal type the following on the command line:

```
mvn ${pluginPrefix}:undeploy
```

#[[##]]# The `${pluginPrefix}:run` Goal

The `${pluginPrefix}:run` goal will run ${appServerName} and deploy your application. If the `jboss-home`
property is not set, a server will be provisioned.

To execute the run goal type the following on the command line:

```
mvn ${pluginPrefix}:run
```

#[[##]]# The `${pluginPrefix}:start` Goal

The `${pluginPrefix}:start` goal will start a ${appServerName}. If the `jboss-home` property is not set,
a server will be provisioned. The server will continue to run until the shutdown goal is executed, a shutdown management
operation has been issued or the process is killed.

To execute the start goal type the following on the command line:

```
mvn ${pluginPrefix}:start
```

#[[##]]# The `${pluginPrefix}:shutdown` Goal

The `${pluginPrefix}:shutdown` goal will shutdown a running ${appServerName}.

To execute the shutdown goal type the following on the command line:

```
mvn ${pluginPrefix}:shutdown
```

#[[##]]# The `${pluginPrefix}:execute-commands` Goal

The `${pluginPrefix}:execute-commands` goal will execute commands, formatted like CLI commands, on the running server.

To execute the execute-commands goal type the following on the command line:

```
mvn ${pluginPrefix}:execute-commands
```