IntelliJ IDEA无法运行Scala测试

时间:2017-02-25 09:03:01

标签: scala intellij-idea scalatest maven-scala-plugin

我的项目基于maven 3,混合了Java和Scala。

我无法在IDEA中运行scalaTest,IDEA抱怨道:

Error:scala: Error: org.jetbrains.jps.incremental.scala.remote.ServerExceptionjava.lang.NullPointerException
  at sbt.compiler.MixedAnalyzingCompiler$.searchClasspathAndLookup(MixedAnalyzingCompiler.scala:167)
  at sbt.compiler.MixedAnalyzingCompiler$.apply(MixedAnalyzingCompiler.scala:178)
  at sbt.compiler.IC$.incrementalCompile(IncrementalCompiler.scala:132)
  at org.jetbrains.jps.incremental.scala.local.SbtCompiler.compile(SbtCompiler.scala:74)
  at org.jetbrains.jps.incremental.scala.local.LocalServer.compile(LocalServer.scala:26)
  at org.jetbrains.jps.incremental.scala.remote.Main$.make(Main.scala:67)
  at org.jetbrains.jps.incremental.scala.remote.Main$.nailMain(Main.scala:24)
  at org.jetbrains.jps.incremental.scala.remote.Main.nailMain(Main.scala)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:498)
  at com.martiansoftware.nailgun.NGSession.run(NGSession.java:319)

我试图使缓存无效并重新启动IDEA,但无法解决此问题,有人可以提供一些帮助吗? thansk

更多信息:

Scala插件的版本是2016.3.744

Scala版本是2.12.1。

maven与scala-maven-plugin配对:

<plugin>
    <groupId>net.alchim31.maven</groupId>
    <artifactId>scala-maven-plugin</artifactId>
    <version>3.2.2</version>
    <executions>
       <execution>
          <goals>
             <goal>compile</goal>
             <goal>testCompile</goal>
          </goals>
       </execution>
    </executions>
  </plugin>

0 个答案:

没有答案