Skip to content

Instantly share code, notes, and snippets.

@tanish-kr
Created February 7, 2018 07:31
Show Gist options
  • Save tanish-kr/e810d5fa71e06ff5b39e6a19e3b54ab9 to your computer and use it in GitHub Desktop.
Save tanish-kr/e810d5fa71e06ff5b39e6a19e3b54ab9 to your computer and use it in GitHub Desktop.
sbtのキャッシュ削除

IntelliJ IDEAとconsoleでやったこと

Console

1. localのpluginsを消す

$ ls -la ~/.sbt/0.13/plugins
total 8
drwxr-xr-x  5 tatsunorinishikori  staff  160  2  7 16:12 ./
drwxr-xr-x  4 tatsunorinishikori  staff  128  2  7 16:12 ../
-rw-r--r--  1 tatsunorinishikori  staff  388  2  7 16:12 idea.sbt
drwxr-xr-x  3 tatsunorinishikori  staff   96  2  7 16:12 project/
drwxr-xr-x  5 tatsunorinishikori  staff  160  2  7 16:12 target/
$ rm -r ~/.sbt/0.13/plugins

2. プロジェクトルートのtargetディレクトリを消す

$ rm -r ${CURRENT_DIR}/target
$ rm -r ${CURRENT_DIR}/project/target

3. プロジェクトルートのprojectディレクトリを消す

$ rm -r ${CURRENT_DIR}/project/project

4. sbtコマンド実行でdependencyをインストール

$ sbt

5. build出来るか確認

$ sbt build
$ sbt assembly

IntelliJ IDEA

キャッシュを再構築する

  • File > Invalidate Caches

しばらく待つ

build出来るか確認

  • Build > Build Project (⌘+F9)

assemblyタスク確認

  • Run > Run 'assembly'

jarが無事に生成されればOK。シンタックスハイライトに時間がかかる

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment