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...