java Jar 文件命名约定

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/119426/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 11:05:26  来源:igfitidea点击:

Jar file naming conventions

javajarnaming-conventions

提问by Ron Tuffin

Are there any industry standard conventions for naming jar files?

是否有任何命名 jar 文件的行业标准约定?

回答by Ron Tuffin

I have been using

我一直在使用

*Informative*-*name*-*M*.*m*.*b*.jar

Where:

在哪里:

M= major version number(changed when backward compatibility is not necessarily maintained)

M= major version number(在不一定保持向后兼容性时更改)

m= minor version number(feature additions etc)

m= minor version number(功能添加等)

b= build number(for releases containing bug fixes)

b= build number(对于包含错误修复的版本)

回答by wdk

If your jar is used for JEE then these guidelinesapply:

如果您的 jar 用于 JEE,那么这些准则适用:

The module name is used as the EJB archive name. By default, the module name should be based on the package name and should be written in all-lowercase ASCII letters. In case of conflict, the module name should be a more specific version (including other part of the package name):

EJB archive: -ejb.jar

EJB client archive: -ejb-client.jar

模块名称用作 EJB 归档名称。默认情况下,模块名称应基于包名称,并应以全小写 ASCII 字母书写。如果发生冲突,模块名称应该是更具体的版本(包括包名称的其他部分):

EJB 存档:-ejb.jar

EJB 客户端存档:-ejb-client.jar