Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JBoss Modules for large number of jar dependencies HOW TO

I'm trying to figure out how to make my WARs lighter by putting JasperReports, Apache POI and other heavy libs directly to JBoss AS by using JBoss Modules.

Now, Jasper uses many many libraries to generate PDF or XLS files as you can see here. Our templates are pretty old and we are stuck with old jasper version 3.7.1 which of course uses older versions of libraries such as commons which are already present on JBoss AS 7.1.1 modules.

How can I make one "big" module which will contain all jars used by Jasper and keep other parts of application using newer modules?

Putting all jars into separate directories seems so much work without guaranteed success, can we put everything into one module without creating package alike directories?

like image 413
zarko.susnjar Avatar asked Nov 01 '13 16:11

zarko.susnjar


1 Answers

We started with JBoss modules recently and wrote a small plugin for Maven that generates module folders with module.xmls based on XML descriptors. The plugin is called smartics-jboss-modules-maven-plugin and you'll find additional information about it at the project's blog.

We just started to work with it, but it already makes the process of synchronization between the POM and the module.xml (plus directory structure) for our projects very easy.

The downside of this approach is that you have to learn an additional XML descriptor and have to configure an additional Maven plugin.

If you want to give it a try, the plugin is licensed under Apache License 2.0.

like image 177
Robert Reiner Avatar answered Oct 12 '22 21:10

Robert Reiner