4

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")
Robin Green
  • 32,079
  • 16
  • 104
  • 187
  • Now `sbt` seems to be in a weird inconsistent state whereby the project sometimes depends on Scalaz 6 (which is what I want), but when I try to publish it, it depends on Scalaz 7 because the new exclusion rule doesn't work properly! E.g. if I do `show compile:full-classpath`, it shows only Scalaz 6 as a dependency. – Robin Green Nov 25 '13 at 11:02
  • Ah, sorry - the relevant exclusion rule only applies to the `test` code, which explains why `show compile:full-classpath` looked OK. – Robin Green Nov 25 '13 at 11:05

1 Answers1

2

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")
Robin Green
  • 32,079
  • 16
  • 104
  • 187
  • That seems like an important thing to note in the documentation on excludes. Perhaps you could submit a pull request or file an issue for it? – Mark Harrah Nov 26 '13 at 03:34