更新后未解决的依赖项 SBT 0.13.0 [英] Unresolved dependency SBT 0.13.0 after update

查看:20
本文介绍了更新后未解决的依赖项 SBT 0.13.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有几个用 Scala 2.10.2 编写并用 sbt 0.12.4 构建的项目.由于我的操作系统是 Ubuntu,我使用 SBT.deb 包安装 sbt 0.12.4.一切都很好.我用 sbt 构建了我的项目.

I have a couple of projects written with Scala 2.10.2 and build with sbt 0.12.4. As my OS is Ubuntu I used the SBT.deb package for installation of sbt 0.12.4. Everything fine. I built my projects with sbt.

昨天我想将 sbt 更新到 0.13.0 版.我下载并安装了新的 .deb 包.项目配置没有改变.

Yesterday I wanted to update sbt to version 0.13.0. I downloaded and installed the new .deb package. The projects configuration has not been changed.

更新后运行 SBT 时出现此故障:

When runnging SBT after the update I get this failure:

$ sbt
Loading /usr/share/sbt/bin/sbt-launch-lib.bash
Getting org.scala-sbt sbt 0.13.0 ...

:: problems summary ::
:::: WARNINGS
        module not found: org.scala-sbt#sbt;0.13.0

    ==== local: tried

      /home/myUser/.ivy2/local/org.scala-sbt/sbt/0.13.0/ivys/ivy.xml

        ::::::::::::::::::::::::::::::::::::::::::::::

        ::          UNRESOLVED DEPENDENCIES         ::

        ::::::::::::::::::::::::::::::::::::::::::::::

        :: org.scala-sbt#sbt;0.13.0: not found

        ::::::::::::::::::::::::::::::::::::::::::::::



:: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS
unresolved dependency: org.scala-sbt#sbt;0.13.0: not found
Error during sbt execution: Error retrieving required libraries
  (see /home/myUser/.sbt/boot/update.log for complete log)
Error: Could not retrieve sbt 0.13.0

<小时>

~/.sbt/update.log 文件在此处可用:http://ubuntuone.com/6RDMgOqMnxdyKgfzrWVUNP~/.sbt/boot/.update.log 文件在此处可用:http://ubuntuone.com/4KqYnSL9Mc1yrmRLbCx6bI


The ~/.sbt/update.log file is available here: http://ubuntuone.com/6RDMgOqMnxdyKgfzrWVUNP The ~/.sbt/boot/.update.log file is available here: http://ubuntuone.com/4KqYnSL9Mc1yrmRLbCx6bI

如何解决此依赖项解析?

  1. 其他人也有类似的问题,例如 这个,但不一样.我不认为这是构建定义不兼容的问题,是吗?据我所知,SBT 没有达到阅读项目定义的地步.

  1. Other people had similar problems like this, but not the same. I don't think this is a problem of build definition incompatibility, do you? As far as I can see, SBT does not get to the point to read the project definition.

应该从哪里检索这个文件?不应该包含在SBT安装包中吗?此外,看起来 SBT/Ivy 只查看本地 Ivy 存储库.Maven Central Repository 中没有版本为 0.13.0 的 SBT 工件.我是否必须指定另一个存储库或其他内容?

From where does this file should be retrieved? Shouldn't it be included in the SBT installation package? Also it looks like SBT / Ivy does only look inside the local Ivy repo. There is no SBT artifact with version 0.13.0 in the Maven Central Repository. Do I have to specify another repo or something?

Scala 版本怎么样?不应该在依赖定义中指定吗?我是否必须在某处指定 Scala 版本?

And what about the Scala version? Shouldn't it be specified in the dependency definition? Do I have to specify the Scala version somewhere?

项目配置:

文件:build.sbt:

<小时>

name := "MyProject"

version := "1.0-SNAPSHOT"

organization := "myOrg"

scalaVersion := "2.10.2"

libraryDependencies += "com.github.nscala-time" %% "nscala-time" % "0.4.2"

<小时>

文件:project/plugins.sbt:

addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "2.3.0")

文件:project/build.properties

在出现这个问题之前,我没有这个文件.我添加它是为了解决这个问题:

File: project/build.properties

Prior to this problem I did not have this file. I added it trying to solve this problem:

sbt.version=0.13.0

推荐答案

我向 ~/.sbt/repositories 添加了一些 repos.这解决了问题.现在文件看起来像这样:

I added some repos to ~/.sbt/repositories. This solved the problem. Now the file looks like this:

[repositories]
  local
  sbt-releases-repo: http://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  sbt-plugins-repo: http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  maven-central: http://repo1.maven.org/maven2/

你也应该看看这个:http://www.scala-sbt.org/0.13.0/docs/Detailed-Topics/Proxy-Repositories.html

但我仍然担心的是,这是否是我和我的系统的个别情况,或者其他人是否也有这样的问题.我是不是误会了什么?因为如果我想使用构建工具,我认为安装后不应该关心工具的依赖关系.这应该由工具的安装本身完成.

But what still worries me is the question if this is an individual case for me and my system or if others have such problems, too. Did I misunderstand something? Because if I want to use a build tool, I don't think it should be my responsibility to care about the tool's dependencies after installation. That should be done by the tool's installation itself.

当然,我有责任关心我的项目的依赖项.

Of course it is my responsibility to care about my project's dependencies.

这篇关于更新后未解决的依赖项 SBT 0.13.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆