当常春藤缓存损坏时,我从sbt得到以下错误
[error] unresolved dependency:commons-codec#commons-codec; 1.10:commons-codec#commons-codec中找不到的配置; 1.10:'主(编译)'.缺少配置:'compile'.它来自com.typesafe.play#play_2.11; 2.4.3编译
如果我删除常春藤缓存中的文件夹commons-codec并运行sbt update,sbt将重新下载依赖项,一切都会好的.
有没有办法告诉sbt删除文件夹并自动重新下载依赖项?
Ton*_*ser 20
这很简单,只是
rm -fr ~/.ivy2/cache # Or mv ~/.ivy2/cache ~/.ivy2/cache_bk
sbt update
最后,如果您在Intellij,文件 - >无效缓存/重新启动.
我只是在20分钟前做了同样的事情.可能也不是坏事.我刚刚在mac上保存了一大块空间.
Atom:~ me$ du -skh ./.iv*
349M    ./.ivy2
1.0G    ./.ivy2_bak
  # empty the ivy cache if you have good network
  # rm -rfv ~/.ivy2/cache/*
  # or even better just backup it to sync it later on ...
  # mv ~/.ivy2/cache ~/.ivy2/cache.`date "+%Y%m%d_%H%M%S`.bak
  # remove all sbt lock files
  find ~/.sbt ~/.ivy2 -name "*.lock" -print -delete
  find ~/.sbt ~/.ivy2 -name "ivydata-*.properties" -print -delete
  # remove all the class files
  rm -fvr ~/.sbt/1.0/plugins/target
  rm -fvr ~/.sbt/1.0/plugins/project/target
  rm -fvr ~/.sbt/1.0/target
  rm -fvr ~/.sbt/0.13/plugins/target
  rm -fvr ~/.sbt/0.13/plugins/project/target
  rm -fvr ~/.sbt/0.13/target
  rm -fvr ./project/target
  rm -fvr ./project/project/target
  sbt clean update
| 归档时间: | 
 | 
| 查看次数: | 15505 次 | 
| 最近记录: |