[英]Why does activator/sbt add Scala version to pure Java library dependencies?
I'm using Typesafe Activator 's last version (1.2.8 with Scala 2.11.x). 我正在使用Typesafe Activator的最新版本(1.2.8与Scala 2.11.x)。
When I add a dependency "org.apache.httpcomponents" %% "httpclient" % "4.4-alpha1"
to my project in build.sbt
, something like this: 当我在build.sbt
向我的项目添加依赖项"org.apache.httpcomponents" %% "httpclient" % "4.4-alpha1"
,如下所示:
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
)
... and try to update the project ( in activator's cli ) I get an error: ...并尝试更新项目(在激活器的cli中)我收到一个错误:
[error] (*:update) sbt.ResolveException: unresolved dependency: org.apache.httpcomponents#httpclient_2.11;4.4-alpha1: not found
I know scala's version aren't binary compatible, but I try to get a pure-java library org.apache.httpcomponent#httpclient
! 我知道scala的版本不是二进制兼容的,但我试图获得一个纯java库org.apache.httpcomponent#httpclient
! Why does activator add "_2.11" at the end of artifactId and make wrong urls...? 为什么激活器在artifactId的末尾添加“_2.11”并制作错误的URL ...? How to resolve it? 怎么解决?
Change the first %%
to a single %
. 将第一个%%
更改为单个%
。 The double character version is for fetching cross-built libraries, and yours isn't. 双字符版本用于获取交叉构建的库,而您的不是。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.