Created
June 17, 2010 04:20
-
-
Save rossabaker/441675 to your computer and use it in GitHub Desktop.
sbt scopes more like Maven
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
override def ivyXML = | |
<configurations defaultconfmapping="*->default(compile)"> | |
<conf name="compile" /> | |
<conf name="runtime" extends="compile" /> | |
<conf name="test" extends="runtime" /> | |
<conf name="provided" /> | |
</configurations> | |
override def defaultConfigurationExtensions = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sbt doesn't resolve library conflicts across Ivy configurations. If a compile-scoped jar depends on log4j-1.2.12, and a runtime-scoped jar depends on log4j-1.2.14, both end up on sbt's runtime classpath and in the jar. The above lets Ivy resolve the conflicts in a more Maven-like fashion, at the expense of a bloated lib_managed (each jar is copied into each child configuration).
Is there a better way?