如何修复sbt的[警告]跳过生成'< exclusion />'为了依赖性? [英] How to fix sbt's [warn] Skipped generating '<exclusion/>' for dependency?

查看:158
本文介绍了如何修复sbt的[警告]跳过生成'< exclusion />'为了依赖性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在sbt中运行 makePom 时,我得到:

When I run makePom in sbt I get:

[warn] Skipped generating '<exclusion/>' for org.scalaz#*. Dependency exclusion should have both 'org' and 'module' to comply with Maven POM's schema.
[warn] Skipped generating '<exclusion/>' for com.jolbox#*. Dependency exclusion should have both 'org' and 'module' to comply with Maven POM's schema.

最简单的解决此问题的方法是生成正确的排除项?

What's the easiest way to fix this problem so that the correct exclusions get generated?

以下不起作用-破坏了scalaz排除规则-我想是因为scalaz 7由多个罐子:

The following does not work - it breaks the scalaz exclusion rule - I presume because scalaz 7 is composed of multiple jars:

ExclusionRule(organization = "org.scalaz", name="scalaz-core")

ExclusionRule(organization = "com.jolbox", name="bonecp")


推荐答案

scalaz排除规则的问题不是多个jar,而是 ExclusionRule %% $ c>,因此我需要为模块名称中包含它们的所有依赖项显式添加Scala版本,例如:

It's not the multiple jars that's the problem for the scalaz exclusion rule - it's that there is no %% in an ExclusionRule, so I needed to explicitly add the Scala version for any dependencies which have them in their module name, like so:

ExclusionRule(organization = "org.scalaz", name="scalaz-core_2.10")

这篇关于如何修复sbt的[警告]跳过生成'&lt; exclusion /&gt;'为了依赖性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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