我正在使用Scala IDE 2.0.1和SBT 0.11.2开始学习Akka 2.0.1。我的build.sbt文件看起来像这样:
name := "akka"
version := "0.1"
scalaVersion := "2.9.2"
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
libraryDependencies += "com.typesafe.akka" % "akka-actor" % "2.0.1"
如您所见,没有什么特别之处。
现在我该如何告诉Eclipse使用带有akka-actor库源分类器的构件?
在SBT中,我可以使用update-classifiers命令从Ivy存储库下载源代码和Javadocs,但即使我在运行sbteclipse插件的eclipse命令之前这样做,Eclipse仍然不知道源代码的存在。当然,我可以手动完成此操作,但对于更多的库来说,这并不可扩展。
我也尝试过使用IvyDE插件和deliver-local命令。虽然它可以集成依赖管理,但似乎无法解决源代码问题。
有什么线索吗?
编辑: 这是deliver-local生成的ivy.xml文件:
<?xml version="1.0" encoding="UTF-8"?>
<ivy-module version="2.0" xmlns:e="http://ant.apache.org/ivy/extra">
<info organisation="default" module="akka_2.9.2" revision="0.1" status="release" publication="20120506225613">
<description>
akka
</description>
</info>
<configurations>
<conf name="compile" visibility="public" description=""/>
<conf name="runtime" visibility="public" description="" extends="compile"/>
<conf name="test" visibility="public" description="" extends="runtime"/>
<conf name="provided" visibility="public" description=""/>
<conf name="optional" visibility="public" description=""/>
<conf name="sources" visibility="public" description=""/>
<conf name="docs" visibility="public" description=""/>
<conf name="pom" visibility="public" description=""/>
</configurations>
<publications>
<artifact name="akka_2.9.2" type="pom" ext="pom" conf="pom"/>
<artifact name="akka_2.9.2" type="jar" ext="jar" conf="compile"/>
<artifact name="akka_2.9.2" type="src" ext="jar" conf="sources" e:classifier="sources"/>
<artifact name="akka_2.9.2" type="doc" ext="jar" conf="docs" e:classifier="javadoc"/>
</publications>
<dependencies>
<dependency org="org.scala-lang" name="scala-library" rev="2.9.2" conf="compile->default(compile)"/>
<dependency org="com.typesafe.akka" name="akka-actor" rev="2.0.1" conf="compile->default(compile)"/>
<exclude org="org.scala-lang" module="scala-library" artifact="*" type="jar" ext="*" matcher="exact"/>
<exclude org="org.scala-lang" module="scala-compiler" artifact="*" type="jar" ext="*" matcher="exact"/>
<override org="org.scala-lang" module="scala-library" matcher="exact" rev="2.9.2"/>
<override org="org.scala-lang" module="scala-compiler" matcher="exact" rev="2.9.2"/>
</dependencies>
</ivy-module>
我对Ivy不熟悉,所以这并没有给我提供太多信息。我只是觉得它提到了源码和javadoc,但是一些IvyDE并没有将其拾取。