为什么SBT不';t使用根项目中的冲突解决程序(在多模块项目中)
在多模块项目中,SBT在构建模块时似乎不使用为什么SBT不';t使用根项目中的冲突解决程序(在多模块项目中),sbt,Sbt,在多模块项目中,SBT在构建模块时似乎不使用resolvers。解析程序在根项目的build.sbt中声明如下: resolvers += "SpringSource Milestone Repository" at "http://repo.springsource.org/milestone" 项目声明如下: lazy val core = project.settings( libraryDependencies ++= { ... } ) 但在编译时,不使用解析程序,我得到:
resolvers
。解析程序在根项目的build.sbt
中声明如下:
resolvers += "SpringSource Milestone Repository" at "http://repo.springsource.org/milestone"
项目声明如下:
lazy val core = project.settings(
libraryDependencies ++= { ... }
)
但在编译时,不使用解析程序,我得到:
[info] Resolving org.springframework.scala#spring-scala;1.0.0.BUILD-SNAPSHOT ...
[warn] module not found: org.springframework.scala#spring-scala;1.0.0.BUILD-SNAPSHOT
[warn] ==== local: tried
[warn] /home/ariskk/.ivy2/local/org.springframework.scala/spring-scala/1.0.0.BUILD-SNAPSHOT/ivys/ivy.xml
[warn] ==== public: tried
[warn] http://repo1.maven.org/maven2/org/springframework/scala/spring-scala/1.0.0.BUILD-SNAPSHOT/spring-scala-1.0.0.BUILD-SNAPSHOT.pom
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: org.springframework.scala#spring-scala;1.0.0.BUILD-SNAPSHOT: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
有什么想法吗?在根项目的
build.sbt
中使用以下命令:
resolvers in ThisBuild += "SpringSource Milestone Repository" at "http://repo.springsource.org/milestone"
在这个构建中,
就是答案。请参阅。我在Scala/ScalaJS项目中遇到了类似的问题
只有在添加到“子项目”时,才使用冲突解决程序
//this works NOT
resolvers += Resolver.sonatypeRepo("snapshots")
// this works
lazy val client = (project in file("client")).settings(
scalaVersion := scalaV,
...,
resolvers += Resolver.sonatypeRepo("snapshots"),
...
(sbt 0.13.15)