我正在尝试在我的maven项目中使用fsc (快速scala编译器)。我的pom.xml有:
...
<execution>
<id>cc</id>
<goals>
<goal>cc</goal>
</goals>
<phase>compile</phase>
<configuration>
<useFsc>true</useFsc>
<once>true</once>
</configuration>
</execution>
...正如在What is the fastest way to compile Scala files using maven?中所讨论的
当我键入mvn scala:cc时,它挂起:
[INFO] wait for files to compile...运行mvn scala:cc -DdisplayCmd=true -Dverbose=true
[INFO] cmd: /bin/sh -c .../java -classpath [redacted] scala.tools.nsc.MainGenericRunner scala.tools.nsc.CompileServer >MainGenericRunner.out 2>MainGenericRunner.err这看起来很奇怪(不应该包括scala.tools.nsc.MainGenericRunner吗?)我注意到MainGenericRunner.out包含
no such file: scala.tools.nsc.CompileServer这似乎证实了我的怀疑。
有没有人遇到过这种情况,或者有解决办法?我真的很想使用fsc来加速我的构建。我发现一个用户在谷歌群组上有类似的输出,但没有后续。
在OSX上运行scala 2.8.1和maven 3.0.3
发布于 2012-09-12 03:56:29
当你调用mvn scala:cc时,maven将使用默认的执行id default-cli (或类似的东西),这并没有在你的pom中配置。正因为如此,maven将使用cc目标的默认值。目前,您的pom已配置为在“编译”阶段使用您的自定义执行cc goal。因此,运行像mvn compile或mvn install这样的东西应该可以像您期望的那样工作。
https://stackoverflow.com/questions/12376494
复制相似问题