Book Image

WildFly: New Features

By : Filippe C Spolti
Book Image

WildFly: New Features

By: Filippe C Spolti

Overview of this book

Table of Contents (13 chapters)
WildFly: New Features
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Defining a dependency through WAR


Applications sometimes become very large due to the amount of libs that the application references. A very cool way to decrease the number of libs a project uses is to use the resources of the application server. In previous versions, it was possible to insert the libs in the lib folder and in the common directory of JBoss. In JBoss 7 and WildFly, we can create our own modules with one or more libs and then configure an explicit dependence through the jboss.deployment-structure file. First, let's prepare our application.

Then, we perform the application build designated for this example.

Access the directory of the application, app2-v02-module, present in the same directory used in the previous chapters, using the following command:

[root@wfly_bookwfly_book]# cd /opt/book_apps/wfly_book/app2-v02-module/

Deploy the application using the following command:

[root@wfly_book app2-v02-module]# mvnwildfly:deploy

Now, access the application and see what happens using...