JBoss Custom lib目录 [英] JBoss Custom lib directory
问题描述
我有这个第三方框架,它带有一大堆依赖库,顺便说一下,还没有在任何Maven存储库中编入索引。我想在一些Web应用程序中使用此框架,但出于显而易见的原因,我不想将所有这些库放在WEB-INF / lib下,我也不想将它们全部放在 server /下default / lib
以避免将它们与其他本地和第三方库混合。
I have this third party framework which comes with a huge set of dependent libraries, which by the way, have not yet been indexed in any Maven repository. I want to use this framework with some Web Apps, but for obvious reasons I don't want to put all those libraries under WEB-INF/lib, neither do I want just to place them all under server/default/lib
to avoid mixing them with other local and third party libraries.
在 JBoss 4.2.2 或更高版本下是否有某种方法可以为某些Web应用程序指定自定义lib目录?有可能和/或建议像 server / default / lib / myAppLib
?
Is there some way under JBoss 4.2.2 or higher to specify a custom lib directory for certain Web Apps? It's possible and/or advisable to have something like server/default/lib/myAppLib
?
对此有任何建议关注?
推荐答案
据我所知,您有三种选择:
To my knowledge, you have three options:
-
将WAR包装在EAR中并将库JAR移出WEB-INF / lib并将
放入lib
EAR根目录下的文件夹。无需额外配置。这个(非便携式)解决方案在配置中有所描述JBoss共享库。
Package you WARs in an EAR and move the library JARs out of WEB-INF/lib and place them in a
lib
folder at the root of the EAR. No extra configuration required. This (non portable) solution is described in Configuring JBoss shared libs.
将库JAR移出WEB-INF / lib并将它们放入 server / xxx / lib中
。
Move the library JARs out of WEB-INF/lib and place them into server/xxx/lib
.
在 deploy /
文件夹中部署JAR并禁用WAR文件类加载器隔离。
Deploy the JARs in the deploy/
folder and disable WAR file class loader isolation.
我不推荐选项#3。选项#2是你不想要的。这给我们留下了选项#1(IMO是最干净的)。
I don't recommend option #3. Option #2 is what you don't want. This leaves us with option #1 (which is IMO the cleanest).
- Jboss shared library
- In JBoss can I configure a "shared library" location?
这篇关于JBoss Custom lib目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!