java - sbt引发[错误]服务器访问错误: Connection refused (Connection refused) url=http://repo. typesafe.com/

原文 标签 java scala playframework sbt typesafe-activator

  • 我清理了~/.ivy2/cache目录。
  • 我的project/plugins.sbt文件:

  • $ cat project/plugins.sbt
    // Comment to get more information during initialization
    logLevel := Level.Warn
    // The Typesafe repository
    resolvers += "Local Maven Repository" at "file:///"+Path.userHome.absolutePath+"/.m2/repository"
    resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
    resolvers += "sonatype-releases" at "https://oss.sonatype.org/content/repositories/releases/"
    // Use the Play sbt plugin for Play projects
    addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.3.10")
    addSbtPlugin("com.typesafe.sbt" % "sbt-scalariform" % "1.2.0")
    addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "0.3.2")
    
  • 我的~/.sbt/repositories文件:

  • $ cat ~/.sbt/repositories
    [repositories]
      local
      activator-launcher-local: file://${activator.local.repository-${activator.home-${user.home}/.activator}/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
      activator-local: file://${activator.local.repository-/Users/debodirno/activator-dist-1.3.12/repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
      sbt-releases-repo: https://repo.typesafe.com/typesafe/ivy-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
      sbt-plugins-repo: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
      maven-central: https://repo1.maven.org/maven2/
      typesafe-releases: https://repo.typesafe.com/typesafe/releases
      typesafe-ivy-releasez: https://repo.typesafe.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
    
    我正在运行activator clean:
    $ activator clean
    [info] Loading project definition from /Users/debodirno/personal/src/sitesearch/project
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.iq80.leveldb/leveldb/0.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.iq80.leveldb/leveldb/0.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.iq80.leveldb/leveldb-api/0.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.iq80.leveldb/leveldb-api/0.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-all/1.7/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-all/1.7/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni/1.7/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni/1.7/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.hawtjni/hawtjni-runtime/1.8/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.hawtjni/hawtjni-runtime/1.8/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-osx/1.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-osx/1.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-linux32/1.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-linux32/1.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-linux64/1.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.fusesource.leveldbjni/leveldbjni-linux64/1.5/ivys/ivy.xml
    [error] Server access Error: Connection refused (Connection refused) url=http://repo.typesafe.com/typesafe/ivy-releases/org.fusesource.leveldbjni/leveldbjni-win32/1.5/ivys/ivy.xml
    ...
    ...
    ...
    
    基本上,我想知道从哪里得到http://repo.typesafe.com/typesafe/ivy-releases/
    另外,我还没有更改项目的配置,所以为什么会突然失败。

    最佳答案

    能够在向 build.sbt 添加额外的类型安全 https 解析器后解析。默认情况下 sbt 选择 http 一个。如果您已经配置了解析器(就像我有 maven),那么新行很重要,否则您可以使用 Seq 构造)
    解析器 +=“Maven 中央服务器”在“https://repo1.maven.org/maven2”
    解析器 +=“类型安全服务器”在“https://repo.typesafe.com/typesafe/releases”

    关于java - sbt引发[错误]服务器访问错误: Connection refused (Connection refused) url=http://repo. typesafe.com/,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63515509/

    相关文章:

    java - Play中用于自定义数据类型的转换器?

    java - PostgreSQL序列相关的问题“id正在重复”?

    java - JList 中不稳定的自动滚动

    java - Java最好的方法来对具有不同对象的另一个列表进行排序

    scala - 映射转换 i.text.toInt 与 toInt(i.text)

    scala - Spark Cluster:如何在每个工作节点上打印出RDD的内容

    scala - 创建一个运行程序的新任务

    api - 同一域中的后端和前端应用程序分开?

    java - 如何在不知道 Java 9 中 jar 文件的包名或文件系统路径的情况下列出所有资源

    java - 需要初始化对象时使用的设计模式?