Shared libraries are files used by multiple applications. You can use shared libraries and global
libraries to reduce the number of duplicate library files on your
system.
<library>
<folder dir="..." />
<file name="..." />
<fileset dir="..." includes="*.jar" scanInterval="5s" />
</library>
A specified file must be a container for the resource (for example a JAR file) rather than the resource itself.
If an element in the list is a file, the contents of that JAR or compressed .zip file are searched. If a folder is specified then resources are loaded from that directory.
Global libraries can be used by any application. JAR files are placed in a global library directory, and then are specified in the class loader configuration for each application.
For more information, see Providing global libraries for all Java EE applications.