J2ee packaging - where should third-party libraries go?

I am working on an old j2ee project. He works for JBoss. He deploys various ears and wars. It also requires a lot of jar files in the $ JBOSS_HOME / server / default / lib directory. Should they all be moved to ear and war files?

+3
source share
2 answers

What you do will work fine, but I usually like to put them in separate EAR / WAR files.

The biggest reason for this is if you have several applications that use the same libraries and want to upgrade to a new version for one application, you can do this without affecting the rest. This, of course, is especially important if the new version of the library introduces a change that should be fixed in all your applications, and not just the one that needs the new version.

+2
source

Each time I put .jar files in $ JBOSS_HOME / server / default / lib, I ended up regretting it. If this simply does not work due to strange addiction problems, it is much better to put them in an ear / war.

+1
source

Source: https://habr.com/ru/post/1715568/


All Articles