Play Framework存储库在哪里?

vek*_*tor 4 ivy maven sbt playframework typesafe-activator

我正在使用Mac OS X 10.9.4上的Typesafe Activator 1.2.3进行离线安装来试用Play Framework 2.3.2 .

activator-1.2.3我解压缩的文件夹中有一个repository看起来类似于我的~/.ivy2/cache文件夹的文件夹,因为它包含...库的文件夹?捆绑?我不懂术语.

现在,就我的理解而言,Activator使用SBT和SBT使用Ivy进行依赖管理.Ivy 就像 Maven,它甚至使用它的存储库.

我的问题是这些:

  • 如果我打开Play Framework项目并且Activator下载所有依赖项,那么究竟发生了什么?
  • 当我开始构建项目时,是否有不同的过程?
  • 库(捆绑?)下载到哪里?
  • activator-1.2.3/repository文件夹是否像引导程序,所有其他依赖项都转到~/.ivy2
  • 如果我安装了Maven并且有一个~/.m2文件夹怎么办?

所以你看我完全迷失了.任何见解都非常受欢迎.

Jac*_*ski 7

由于2.3.x Play被分发为Activator发行版,其中包含遵循sbt规则的所有Play依赖项,即本地构建~/.ivy2/local的依赖项/库在下载的依赖项/库的缓存不足时进行~/.ivy2/cache.

后来在Play 2.3文档的新内容中:

默认常春藤缓存和本地存储库

Play现在使用默认的常春藤缓存和存储库,位于用户主目录的.ivy2文件夹中.

这意味着Play现在可以更好地与其他sbt构建集成,不需要多次缓存工件,并允许共享本地发布的工件.

当您update(以及因此compilerun)Play 2.3.x项目时,依赖关系转到~/.ivy2/cache.

下面的内容是activator-1.2.3/repository一个本地的Ivy2存储库,可以加快解决从在线存储库下载的依赖关系.

根据依赖关系~/.m2必须在描述明确添加库依赖解析器 SBT的官方文档.

您可能会发现fullResolvers有助于了解可用解析器/存储库的任务.

[jacoco4sbt-play] $ help fullResolvers
Combines the project resolver, default resolvers, and user-defined resolvers.
[jacoco4sbt-play] $ show fullResolvers
[info] ArrayBuffer(Raw(ProjectResolver(inter-project, mapped: )), FileRepository(local,FileConfiguration(true,None),Patterns(ivyPatterns=List(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=List(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false)), public: http://repo1.maven.org/maven2/, Typesafe Releases Repository: http://repo.typesafe.com/typesafe/releases/)
[success] Total time: 0 s, completed Sep 23, 2014 11:02:19 PM
Run Code Online (Sandbox Code Playgroud)