maven-2 - 依赖项中可能的分类器和类型列表

标签 maven-2 dependencies classification

我已经在网络上搜索了您可以在依赖项标记内的范围标记中放置的所有可能值,但是我没有找到任何具有相同分类器和类型数据的列表。

有谁知道我可以和不能在这个标签里放什么?

为了清楚起见,我不是在问分类器标签或类型标签有什么作用,我只是想要一个此标签接受的数据列表或在哪里可以找到它。

谢谢!

最佳答案

来自 the Maven Reference :
更新
哎呀,我误解了这个问题。这是我的第二个镜头(重要部分我用斜体标出):

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.


对我来说,这表明你可以使用任何你想要的分类器——它不限于一组特定的可能值。

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.


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

关于maven-2 - 依赖项中可能的分类器和类型列表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6124537/

相关文章:

java - 如何摆脱 xmlbeans-maven-plugin 生成的代码中的泛型警告?

maven-2 - 我可以从 Maven/Hudson 自动调用 QTP 测试套件吗?

javascript - 使用 require.js 依赖注入(inject)

java - Maven 忽略为 javax.mail 提供的范围

python - 在 Windows 中测试时,使用 fasttext api 的监督分类返回空数组

java - 如何告诉 Maven 构建一个可执行的 jar

maven-2 - 是否可以修改 Maven 控制台输出以隐藏 [INFO] 日志记录?

c++ - DLL 的导入目录不适用于 64 位 dll

c# - Encog 框架没有给出可接受的错误率

machine-learning - 通过神经网络从特征中分段进行分类