java WAR文件的版本号
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/16526434/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Version number to WAR file
提问by HarsH
Is it possible to add version number to WAR file specific to weblogic server ? To provide build files to client, they want us to get version number in WAR file. Is it possible or is there any standard approach for this ?
是否可以将版本号添加到特定于 weblogic 服务器的 WAR 文件中?为了向客户端提供构建文件,他们希望我们在 WAR 文件中获取版本号。是否有可能或是否有任何标准方法?
PN : Also I'm using jDeveloper as an IDE.
PN :我还使用 jDeveloper 作为 IDE。
Thanks in advance !
提前致谢 !
回答by whiskeyspider
It is appropriate to add version information to a JAR/WAR manifest file. See herefor more information.
将版本信息添加到 JAR/WAR 清单文件是合适的。请参阅此处了解更多信息。
Specification-Title: Java Utility Classes
Specification-Version: 1.2
Specification-Vendor: Example Tech, Inc.
Implementation-Title: java.util
Implementation-Version: build57
Implementation-Vendor: Example Tech, Inc.
回答by user1676075
Other WebLogic components add a revision to the jar (war) file name, e.g.: xxx_warfile_rev1.0.war. So a "_rev1.0" (or appropriate version) naming is at least consistent with other WebLogic functions. Assuming you're only trying to version the entire .war as a single release, that's probably sufficient.
其他 WebLogic 组件向 jar (war) 文件名添加修订版,例如:xxx_warfile_rev1.0.war。所以“_rev1.0”(或适当的版本)命名至少与其他WebLogic 功能保持一致。假设您只是尝试将整个 .war 版本作为单个版本,这可能就足够了。
回答by HarsH
I managed to version the WAR file for weblogic through Manifest.mf file. If facing the same issue you can have a look at below mentioned URL -
我设法通过 Manifest.mf 文件对 weblogic 的 WAR 文件进行了版本控制。如果遇到同样的问题,您可以查看下面提到的 URL -