情景1:
使用命令play ~run
开始播放 2.2.4 项目,然后将一些代码从A.java移至B.java =>以下输出:
[info] Compiling 2 Java sources to D:\MyProject\target\scala-2.10\classes...
[info] Compiling 1 Java source to D:\MyProject\target\scala-2.10\classes...
[warn] Note: D:\MyProject\app\controllers\AdminController.java uses or overrides a deprec
ated API.
[warn] Note: Recompile with -Xlint:deprecation for details.
[success] Compiled in 4s
情景2:
使用命令activator ~run
开始播放 2.3.4 (激活器)项目,然后将一些代码从A.java移动到B.java =>以下输出:
[info] Compiling 9 Scala sources and 368 Java sources to D:\MyProject\target\scala-2.11\c
lasses...
[warn] Note: Some input files use or override a deprecated API.
[warn] Note: Recompile with -Xlint:deprecation for details.
[success] Compiled in 64s
为什么Play 2.3.4会重新编译第二种情况下的所有来源?那有什么设置吗?这两个方案都适用于同一个项目,在这两种情况下,我都会在进行更改之前运行play/activator clean
和play/activator compile
。