Usage

The WildFly Maven Plugin is generally used to deploy applications or application artifacts to a running WildFly 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 wildfly:add-resource Goal

The wildfly:add-resource goal adds a resource to the running WildFly Application Server.

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

mvn wildfly:add-resource

The wildfly:deploy Goal

The wildfly:deploy goal deploys the application to the running WildFly Application Server.

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

mvn wildfly:deploy

The wildfly:deploy-only Goal

The wildfly:deploy-only goal deploys the application to the running WildFly without executing any other goals by default.

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

mvn wildfly:deploy-only

The wildfly:deploy-artifact Goal

The wildfly:deploy-artifact goal deploys an arbitrary artifact to the running WildFly.

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

mvn wildfly:deploy-artifact

The wildfly:dev Goal

The wildfly:dev goal will start WildFly 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 wildfly:dev

The wildfly:package Goal

The wildfly: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 wildfly:package

The wildfly:provision Goal

The wildfly:provision goal will provision a server.

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

mvn wildfly:provision

The wildfly:redeploy Goal

The wildfly: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 wildfly:redeploy

The wildfly:redeploy-only Goal

The wildfly: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 wildfly:redeploy-only

The wildfly:undeploy Goal

The wildfly: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 wildfly:undeploy

The wildfly:run Goal

The wildfly:run goal will run WildFly 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 wildfly:run

The wildfly:start Goal

The wildfly:start goal will start a WildFly. 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 wildfly:start

The wildfly:shutdown Goal

The wildfly:shutdown goal will shutdown a running WildFly.

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

mvn wildfly:shutdown

The wildfly:execute-commands Goal

The wildfly: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 wildfly:execute-commands