在 Travis 构建中为 SBT 启动器配置 repo

Configure repo for SBT launcher in Travis build

当 Travis 提供 SBT 实例时,我在哪里可以覆盖 SBT 用于获取其启动器的 repo URL-CI?

http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar 目前给出 404,因此,Travis 上的构建失败了:

$ sbt clean dependencyUpdates coverage test coverageReport
Detected sbt version 0.13.8
Downloading sbt launcher for 0.13.8:
  From  http://typesafe.artifactoryonline.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar
    To  /home/travis/.sbt/launchers/0.13.8/sbt-launch.jar
Download failed. Obtain the jar manually and place it at /home/travis/.sbt/launchers/0.13.8/sbt-launch.jar

我 运行 今天遇到了同样的问题,并为 travis-ci 记录了一个问题:https://github.com/travis-ci/travis-ci/issues/4527

作为解决方法,您可以通过将 before_script 部分添加到您的 .travis.yml

来下载 sbt-launcher.jar
before_script:
- mkdir -p $HOME/.sbt/launchers/0.13.8/
- curl -L -o $HOME/.sbt/launchers/0.13.8/sbt-launch.jar http://dl.bintray.com/typesafe/ivy-releases/org.scala-sbt/sbt-launch/0.13.8/sbt-launch.jar

我们刚刚将修复程序部署到生产环境中。 SBT 构建现在应该可以正常工作了。

对于给您带来的不便,我们深表歉意。

https://github.com/travis-ci/travis-ci/issues/4527#issuecomment-124123880