Tel Map

Blog

WildFly Maven Deploy

While working on automatically deploying a maven artifact to a WildFly server using the WildFly Maven Plugin, I could not find a full working example on the corresponding webpage. It took quite some time, even if it is not much code. Below is everything you need to deploy a maven artifact to WildFly.

This is the pom.xml I use for deploying to a local WildFly server. The pom file below can also be used for a remote deploy, however. I am using WidFly 14 for the example provided below.

In order for being able to deploy to WildFly, you first have to create a new Management user by executing add-user.bat or add-user.sh in the bin directory of WildFly.

After that you have to store those credentials and the credentials of your maven repository in the home directory of the current user under .m2/settings.xml. In my example the artifact I am deploying is hosted on a private repository….

The ids in the settings.xml have to match the server you want to deploy to (deploy_server in my example) and the maven repository where the artifact is stored (illucit_artifactory in my example).

The pom.xml also contains a variable for the corresponding artifact version that you want to deploy ( ${artifact.version} ).

Please also replace the mentioned artifact ArtifactIWantToDeploy with your corresponding maven artifact in the example above.

After setting everything up this way, you can simply do a deploy by running the maven command below in the same directory as the pom.xml provided above.

I hope this full example can help someone save an hour or two…

If you have any question or comments, please leave a message below!

14.12.2018 |
Schlagwörter: , , ,

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.

Diese Seite verwendet Cookies. Durch die weitere Nutzung der Webseite stimmen Sie der Verwendung von Cookies zu. Weitere Informationen zu Cookies erhalten Sie in unserer Datenschutzerklärung.