简体   繁体   English

Maven错误启动了fsc?

[英]Maven improperly starting fsc?

I am trying to use fsc (fast scala compiler) with my maven project. 我正在尝试在我的Maven项目中使用fsc(快速scala编译器)。 My pom.xml has: 我的pom.xml具有:

...
 <execution>
   <id>cc</id>
   <goals>
     <goal>cc</goal>
   </goals>
   <phase>compile</phase>
   <configuration>
     <useFsc>true</useFsc>
     <once>true</once>
   </configuration>
 </execution>
...

as discussed in What is the fastest way to compile Scala files using maven? 使用maven编译Scala文件的最快方法中所讨论的那样

When I type mvn scala:cc , it hangs on: 当我键入mvn scala:cc ,它挂起了:

[INFO] wait for files to compile...

Running mvn scala:cc -DdisplayCmd=true -Dverbose=true 运行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

Which seems odd (shouldn't it not include scala.tools.nsc.MainGenericRunner ?) I noticed that MainGenericRunner.out contains 这似乎很奇怪(应该不包括scala.tools.nsc.MainGenericRunner吗?)我注意到MainGenericRunner.out包含

no such file: scala.tools.nsc.CompileServer

which seems to confirm my suspicion. 这似乎证实了我的怀疑。

Has anyone encountered this, or have a work around? 有没有人遇到过这个问题,或者有解决方法? I'd really like to use fsc to speed up my builds. 我真的很想使用fsc加快构建速度。 I found one user with a similar output on google groups, but no follow ups. 我在Google网上论坛上找到了一个具有类似输出的用户,但没有跟进。

Running scala 2.8.1 and maven 3.0.3 on OSX 在OSX上运行Scala 2.8.1和Maven 3.0.3

When you invoke mvn scala:cc maven will use execution id default-cli (or something similar) which is not configured in your pom. 当您调用mvn scala:cc maven将使用pom中未配置的执行ID default-cli(或类似名称)。 Because of that maven will be using defaults of cc goal. 因此,Maven将使用cc目标的默认值。 Currently your pom is configured to execute cc goal with your customizations during "compile" phase. 当前,您的pom配置为在“编译”阶段通过自定义执行cc目标。 So, running something like mvn compile or mvn install should be working as you expect. 因此,运行mvn compilemvn install类的东西应该可以按预期工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM