How to fix sbt's [warn] Skipped generating '<exclusion/>' for dependency?

时间秒杀一切 提交于 2019-12-10 15:46:13

问题


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?


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")

and

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

回答1:


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")


来源:https://stackoverflow.com/questions/20189211/how-to-fix-sbts-warn-skipped-generating-exclusion-for-dependency

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!