首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >SBT未解析Squeryl依赖项

SBT未解析Squeryl依赖项
EN

Stack Overflow用户
提问于 2013-06-06 21:14:29
回答 4查看 1.8K关注 0票数 2

我最近开始了一个新的项目!框架和Scala。我习惯于在ORM中使用Squeryl,但由于某种原因,这次它不能解决我的依赖关系(尽管它可以解决其他问题,只是不能解决squeryl)。

唯一不同的是,我使用的是与以前不同的计算机(现在是Windows,以前是Arch ),并且我使用的是Play 2.1.1而不是2.1。

编辑:我也在代理后面,我认为这可能已经解决了,因为我可以解决一些依赖,但我看不到任何其他原因,除了代理是搞乱sbt。我可以在浏览器中看到squeryl的maven代码库,但sbt找不到它。

build.properties:

代码语言:javascript
复制
sbt.version=0.12.2

Build.scala:

代码语言:javascript
复制
val appDependencies = Seq(
// Add your project dependencies here,
  jdbc,
  "org.squeryl" %% "squeryl" % "0.9.5-6"
)

plugins.sbt:

代码语言:javascript
复制
// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository 
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.1.1")

控制台:

代码语言:javascript
复制
C:\Path\To\Play\APP>play run
[info] Loading project definition from C:\Path\To\Play\APP
....
[warn]  module not found: org.squeryl#squeryl_2.10;0.9.5-6
[warn] ==== local: tried
[warn]   C:\Path\To\Play\play-2.1.1\repository\local\org.squeryl\squeryl_2.10
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.po
[warn] ==== Typesafe Snapshots Repository: tried
[warn]   http://repo.typesafe.com/typesafe/snapshots/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.p
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.squeryl#squeryl_2.10;0.9.5-6: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
    at sbt.IvyActions$$anonfun$update$1.apply(IvyActions.scala:122)
    ...
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
[warn] some of the dependencies were not recompiled properly, so classloader is not avaialable
[info] Updating {file:/C:/Path/To/Play/APP}
[warn]  module not found: org.squeryl#squeryl_2.10;0.9.5-6
[warn] ==== local: tried
[warn]   C:\Path\To\Play\play-2.1.1\repository\local\org.squeryl\squeryl_2.10
[warn] ==== Typesafe Releases Repository: tried
[warn]   http://repo.typesafe.com/typesafe/releases/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.po
[warn] ==== Typesafe Snapshots Repository: tried
[warn]   http://repo.typesafe.com/typesafe/snapshots/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.p
[warn] ==== public: tried
[warn]   http://repo1.maven.org/maven2/org/squeryl/squeryl_2.10/0.9.5-6/squeryl_2.10-0.9.5-6.pom
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  ::          UNRESOLVED DEPENDENCIES         ::
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
[warn]  :: org.squeryl#squeryl_2.10;0.9.5-6: not found
[warn]  ::::::::::::::::::::::::::::::::::::::::::::::
sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
    at sbt.IvyActions$.sbt$IvyActions$$resolve(IvyActions.scala:214)
    .....
    at java.lang.Thread.run(Unknown Source)
[error] (*:update) sbt.ResolveException: unresolved dependency: org.squeryl#squeryl_2.10;0.9.5-6: not found
EN

回答 4

Stack Overflow用户

回答已采纳

发布于 2013-06-11 01:52:49

这最终是我的代理在工作中的一个问题,它设置错误,必须纠正它。现在一切都好了!

票数 0
EN

Stack Overflow用户

发布于 2013-06-08 00:18:39

当您看到http://repo1.maven.org/maven2/org/squeryl/时,您将得到解决方案。

PROJECT/project/Build.scala

代码语言:javascript
复制
   val appDependencies = Seq(
 // Add your project dependencies here,
  jdbc,
  anorm,
  "org.squeryl" % "squeryl_2.10" % "0.9.5-6"
)
票数 4
EN

Stack Overflow用户

发布于 2013-06-06 21:24:55

为了确保这不是一个潜在的SBT项目的配置问题,现在不要使用%%表示法。实际上,它会自动选择与您当前的scala版本相对应的Jar版本,这可能与您期望的版本不同( conf中的疏忽、某些配置文件中的变量冲突等)。

为了隔离你的“错误”上下文,我更喜欢这样:

代码语言:javascript
复制
 libraryDependencies += "org.squeryl" % "squeryl" % "0.9.5-6"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/16963101

复制
相关文章

相似问题

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