5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Proxy Repositories(Nexus)利用時、SBT設定

Last updated at Posted at 2015-12-16

sbt version

> sbt-binary-version
[info] 0.13
> sbt-version
[info] 0.13.9

経緯

Playframework検証のため、activatorとsbtを入れて activator ... sbt ... コマンドを実行したら、参照ライブラリーのダウンロード失敗

Nexusに proxy repositoriesを追加

proxyタイプとして以下のように追加

Repository Name Remote Storage Location
maven-central http://repo1.maven.org/maven2/
typesafe-releases http://repo.typesafe.com/typesafe/releases/
typesafe-ivy-releasez http://repo.typesafe.com/typesafe/ivy-releases/

~/.sbt/repositoriesを修正

修正前

[repositories]
  local
  activator-local: file:////${activator.local.repository-C:/activator-dist-1.3.7//repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  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]
  maven-central
  typesafe-releases: http://repo.typesafe.com/typesafe/releases
  typesafe-ivy-releasez: http://repo.typesafe.com/typesafe/ivy-releases, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

修正後

[repositories]
  local
  activator-local: file:////${activator.local.repository-C:/activator-dist-1.3.7//repository}, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]
  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]
  maven-central: http://xxxxx/nexus/content/repositories/central
  typesafe-releases: http://xxxxx/nexus/content/repositories/typesafe-releases
  typesafe-ivy-releasez: http://xxxxx/nexus/content/repositories/typesafe-ivy-releasez, [organization]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]

sbtコマンドを実行し、問題ないことを確認

c:\>sbt console
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
Getting org.scala-sbt sbt 0.13.9 ...
...省略...
[info] Set current project to root (in build file:/C:/)
[info] Updating {file:/C:/}root...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Starting scala interpreter...
[info]
Welcome to Scala version 2.10.5 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_65).
Type in expressions to have them evaluated.
Type :help for more information.
scala>
5
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
5
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?