Search code examples
playframework-2.0sbtruntimeexceptionsbt-native-packager

Duplicate mappings for scala-library-2.10.3.jar with sbt-native-packager 0.7+


I'm stuck with Play 2.2.6 and Scala 2.10 for a project. sbt-native-packager 0.6.4 is compatible, but has a bug I can't live with (passing a relative path to scriptClasspath throws java.lang.IllegalArgumentException: character to be escaped is missing). I see this got fixed in sbt-native-packager 0.7.0.

Unfortunately, when I try the sbt stage task using sbt-native-packager 0.7.0 or later I get:

java.lang.RuntimeException: Duplicate mappings:
/work/myProject/target/universal/stage/lib/org.scala-lang.scala-library-2.10.3.jar
from
/opt/play-2.2.6/repository/local/org.scala-lang/scala-library/2.10.3/jars/scala-library.jar
/home/mslinn/.ivy2/cache/org.scala-lang/scala-library/jars/scala-library-2.10.3.jar

Suggestions?


Solution

  • I took a shortcut and patched the 0.6 branch so I could fix the error there. Here is the forked GitHub project, complete with instructions on how to install it.