1

「play compile」和「sbt compile」是否有區別?當我使用編譯我的應用「玩編譯」它編譯罰款,但是當我做同樣的「SBT編譯」我得到的錯誤「play compile」和「sbt compile」之間的區別

sbt.ResolveException: unresolved dependency: com.abc.xyz#xyz-lib;1.0-SNAPSHOT: not found 

但是這種關係在我的本地倉庫($HOME/.m2/repository)可用。

您能否幫我理解爲什麼編譯失敗時我專門使用了sbt以及sbtplay編譯有什麼區別?

+2

Look [here](http://stackoverflow.com/questions/25101066/activator-vs-sbt)and [here](http://stackoverflow.com/questions/25084045/where-is-sbt-inside -typesafe-activator) – lambdas 2014-10-19 06:34:46

+0

除此之外,play framework還定製了類加載器以啓用「點擊刷新工作流程」。 – 2014-10-19 15:01:49

+0

我正在使用Play 2.2.0。這個版本的Play還有Activator? – Bourne 2014-10-19 15:58:26

回答

0

當您使用play命令時,您正在調用play shell腳本或play.bat批處理腳本。這也將從您的播放設置拉動一些配置:

也許play命令拉入存儲庫配置。這就是我得到:

play-2.2.3/framework/project/ 

find . -type f -exec grep -nH -e resolver {} + 
./Build.scala:49: resolvers ++= typesafeResolvers, 
./Build.scala:291:  resolvers += typesafeIvyReleases, 
./RepositoryBuilder.scala:38: resolvers <+= localRepo apply { f => Resolver.file(localRepoName, f)(Resolver.ivyStylePatterns) }, 
./RepositoryBuilder.scala:68:  log.debug("Module: " + mrid + " should use resolver: " + name) 

但是當你使用sbt,你基本上是依賴於confguration您的應用程序已經設置的項目。

我認爲你的答案在哪裏。