How to attach sources to SBT managed dependencies in Scala IDE?

前端 未结 5 980
执念已碎
执念已碎 2020-12-30 23:02

I\'m using Scala IDE 2.0.1 and SBT 0.11.2 to start with Akka 2.0.1. My build.sbt looks like this:

name := \"akka\"

version := \"0.1\"

scalaVersion := \"2.9         


        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-30 23:23

    Finally I found a solution to let sbt download the sources and tell Eclipse where to find them.

    Add in build.sbt:

    EclipseKeys.withSource := true
    

    Then run:

    rm -rf  ~/.ivy2/cache/
    
    sbt update-classifiers
    
    sbt eclipse
    

    The weird part is that if you already downloaded the dependencies in ivy, you have them in cache and you won't be able to download the sources for them.

提交回复
热议问题