在不同的战争EAR单独同罐子 [英] Separate same jars in different WAR of a EAR
问题描述
目前我们所面临的一个问题。我们正在建设一个耳朵,其中包含多个WAR文件。在战争2包含同样的罐子。这两种战争需要deployment.So在这些瓶子有什么办法在ANT我可以建立它使这些罐子会在一个地方和耳部署期间它不会产生任何问题。
currently we are facing one problem. We are building a ear which contains multiple war files. In 2 of the WARs contains same jars. Both these wars need these jars during deployment.So Is there any way in ANT I can built it so that these jars will be in one single place and it will not create any problem during the ear deployment.
推荐答案
好了,你可以做到这一点的可移植的方式:
well, you can do it the portable way:
将库JAR在.ear文件的根。结果
例如:
Place the library jars at the root of .ear file.
Example:
library jar -> lib1.jar, lib2.jar
[EAR STRUCTURE]
your.ear
|--yourfirst.war
|--yoursecond.war
|--lib1.jar
|--lib2.jar
在更新的两个的将.war文件中的MANIFEST.MF文件指向这些罐子
像这样:结果类路径:lib1.jar lib2.jar
结果
(不要忘记添加一个空格,换行字符上面一行的末尾如果这是在最后一个项目清单)
Update the MANIFEST.MF files in both the .war files to point to these jars
like so:
Class-Path: lib1.jar lib2.jar
(dont forget to add a space and a newline character to the end of the above line if this is the last entry in the manifest)
这篇关于在不同的战争EAR单独同罐子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!