首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么激活器/sbt将Scala版本添加到纯Java库依赖项中?

为什么激活器/sbt将Scala版本添加到纯Java库依赖项中?
EN

Stack Overflow用户
提问于 2014-08-20 08:58:30
回答 1查看 1.3K关注 0票数 6

我使用的是Typesafe活化剂的上一个版本(1.2.8与Scala2.11.x)。

当我将依赖项"org.apache.httpcomponents" %% "httpclient" % "4.4-alpha1"添加到build.sbt中的项目时,如下所示:

代码语言:javascript
复制
libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-actor" % "2.3.4",
  "com.typesafe.akka" %% "akka-testkit" % "2.3.4",
  "org.scalatest" %% "scalatest" % "2.1.6" % "test",
  "junit" % "junit" % "4.11" % "test",
  "com.novocode" % "junit-interface" % "0.10" % "test",
  "org.apache.httpcomponents" %% "httpclient" % "4.4-alpha1" // my added dependency
)

..。并尝试更新项目(在激活器的cli中),我得到了一个错误:

代码语言:javascript
复制
[error] (*:update) sbt.ResolveException: unresolved dependency: org.apache.httpcomponents#httpclient_2.11;4.4-alpha1: not found

我知道scala的版本不是二进制兼容的,但是我尝试获得一个纯java库org.apache.httpcomponent#httpclient!为什么激活剂在_2.11的末尾加上“artifactId”,并制造错误的urls.?如何解决这个问题?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-08-20 09:09:34

将第一个%%更改为单个%。双字符版本用于获取交叉建造库,而您的版本则不是。

票数 18
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/25400625

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档