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

前端 未结 5 1072
执念已碎
执念已碎 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:26

    I managed to get this working finally.

    I had to use an external ivy settings file:

    
      
      
      
      
        
          
          
          
            
            
          
          
          
          
        
      
    
    

    And add:

    externalIvySettings(baseDirectory(_ / "ivysettings.xml"))
    

    to my Build.scala.

    The order of the resolvers in the chain proved to be important, because if Ivy finds a jar but no sources it won't check the other resolvers for sources/javadoc. The repository in the local Play install doesn't have sources or javadoc in.

    This gets me source attachments for most of the jars in my dependencies when IvyDE resolves in Eclipse.

提交回复
热议问题