[英]IntelliJ: scala: javac: invalid source release: 1.7
I recently upgraded a Maven project to Java 7. 我最近将Maven项目升级到Java 7。
I use IntelliJ, and with Java 6, I could run my JUnit tests out of the IDE. 我使用IntelliJ,并且使用Java 6,可以在IDE之外运行JUnit测试。 This was convenient because it was a quick way to debug a failing test. 这很方便,因为它是调试失败的测试的快速方法。
Since upgrading to 7 I get the following error when I try to Run a test: 由于升级到7,当我尝试运行测试时出现以下错误:
scala: javac: invalid source release: 1.7
scala: Usage: javac <options> <source files>
scala: use -help for a list of possible options
I'm on OS X 10.8.5 and IntelliJ 12.1.6. 我在OS X 10.8.5和IntelliJ 12.1.6上。 Any help fixing these errors would be hugely appreciated. 修复这些错误的任何帮助将不胜感激。
Does your setup look anything like this ? 您的设置看起来像这样吗? UTF-8 1.6 UTF-8 1.6
.... ....
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<args>
<!--<arg>-unchecked</arg>-->
<!--<arg>-deprecation</arg>-->
<!--<arg>-explaintypes</arg>-->
</args>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.