使用IntelliJ IDEA处理源和测试的不同语言和目标级别 [英] Handle different language and target levels for sources and tests with IntelliJ IDEA

查看:149
本文介绍了使用IntelliJ IDEA处理源和测试的不同语言和目标级别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很感兴趣,如果有人知道如何在IDEA的项目属性中处理这个pom:

I'm interested if someone has clue how to handle this pom in projects properties of IDEA:

<plugin>
   <groupId>org.apache.maven.plugins</groupId>
   <artifactId>maven-compiler-plugin</artifactId>
   <configuration>
       <source>1.3</source>
       <target>1.3</target>
       <testSource>1.5</testSource>
       <testTarget>1.5</testTarget>
   </configuration>
   <version>3.0</version>
</plugin> 

我应该设置项目级别1.3和模块级别1.5还是明智的一周?

Should I set project level 1.3 and module level 1.5 or wise verse around?

在IDEA重新加载maven项目的任何时候,它都会设置语言级别,因为它从maven到1.3并且总是抱怨测试类。

As well anytime when IDEA reloads maven project it sets language levels as it thinks from maven to 1.3 and after always complaints about test classes.

但这会作为错误报告给JetBrains。

But this will go as bug report to JetBrains.

推荐答案

此请求会跟踪支持测试源/目标级别。语言级别更改的消息也是已知问题

Supporting test source/target levels is tracked by this request. Language level changed message is also a known issue.

这篇关于使用IntelliJ IDEA处理源和测试的不同语言和目标级别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆