依赖项中可能的分类器和类型的列表 [英] List of possible classifiers and types in dependencies

查看:99
本文介绍了依赖项中可能的分类器和类型的列表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在网上搜索了可以在依赖项标签内的作用域标签中放入的所有可能值,但是我没有找到具有相同分类器和类型数据的任何列表.

I have searched the net for the all the possible values that you can put in the scope tag inside dependency tag, but I haven't found any list with the same data for the classiffier and the type.

有人知道我可以和不能将这些标签放入其中吗?

Anybody knows what I can and cannot put inside this tags?

请清楚一点,我不是在问分类标签或类型标签是做什么的,我只想列出该标签接受的数据列表或在哪里可以找到它.

Just to be clear, I am not asking what does the classifier tag or the type tag do, I just want a list of the data that this tag accepts or where can I find it.

谢谢!

推荐答案

来自 Maven参考:

糟糕,我误解了这个问题.这是我的第二张照片(重要的部分由我斜体显示):

Oops, I misunderstood the question. Here is my second shot (important parts italicized by me):

分类器允许区分从相同POM构建但内容不同的工件. 这是一些可选的任意字符串,如果存在,则在版本号之后附加到工件名称.

The classifier allows to distinguish artifacts that were built from the same POM but differ in their content. It is some optional and arbitrary string that - if present - is appended to the artifact name just after the version number.

对我来说,这表明您可以使用所需的任何分类器-它不仅限于一组可能的值.

To me this suggests that you can use any classifier you want - it is not limited to a certain set of possible values.

类型:与从属工件的包装类型相对应.默认为jar. 尽管它通常表示依赖项文件名的扩展名,但并非总是如此.可以将类型映射到其他扩展名和分类器.类型通常与所使用的包装相对应,尽管并非总是如此.一些示例是jarejb-clienttest-jar. 可以通过将扩展名设置为true的插件来定义新类型,因此这不是完整的列表.

type: Corresponds to the dependant artifact's packaging type. This defaults to jar. While it usually represents the extension on the filename of the dependency, that is not always the case. A type can be mapped to a different extension and a classifier. The type often corresponds to the packaging used, though this is also not always the case. Some examples are jar, ejb-client and test-jar. New types can be defined by plugins that set extensions to true, so this is not a complete list.

再次说明,尽管通常在该属性中找不到其他任何众所周知的包装类型,但可能的值列表是开放的且特定于插件.

Which again tells, that although usually you won't find anything else in this property as the well known packaging types, the list of possible values is open and plugin-specific.

这篇关于依赖项中可能的分类器和类型的列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆