WildFly Maven Plugin to Deploy Applications and Artifacts (Tech Tip #9)

Applications can be deployed to WildFly in many different ways. One of the typical ways it to use the wildfly-maven-plugin. This tech tip will provide details on that.

Actually, you just need to add wildfly-maven-plugin to your pom.xml as:

And that’s it!

Fire up a WildFly instance as explained in Tech Tip #1. Deploy your application to this WildFly instance using:

Simple, isn’t it ?

You can even start a WildFly instance defined by -Djboss-as.home property and deploy the application using the following command:

The property -Djboss-as.home may not be specified in which case WildFly is downloaded and started and the application is deployed to it.

The version of WildFly to be downloaded can be optionally specified as:

Now this application can be redeployed as:

Or undeployed as:

This plugin provide lots of other targets:

Goals Description
wildfly:deploy-only Only deploy, without packaging
wildfly:redeploy-only Redeploy, without packaging
wildfly:add-resource Adds a resource to the server (only in domain mode)
wildfly:add-artifact Adds an arbitrary artifact
wildfly:execute-command Execute commands to the running instance, batch mode supported as well

Refer to the plugin usage page and documentation for complete details.

Other deployment mechanisms such as jboss-cli, web-based admin console, REST API, and filesystem based will be covered in future blogs.

What is your typical way to deploy an application to WildFly ?

What is your deployment preference during development ? Does it differ from testing deployment phase ?

Be Sociable, Share!
  • Tweet

One thought on “WildFly Maven Plugin to Deploy Applications and Artifacts (Tech Tip #9)

Leave a Reply

Your email address will not be published. Required fields are marked *


− three = 5

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">