Intellij 未在 Tycho/Maven 构建中检测到合适的 Java 版本
Intellij not detecting appropriate Java version in Tycho/Maven build
我正在尝试将 Tycho/Maven 项目从 Eclipse PDE 迁移到 Intellij,但我无法让 Intellij 使用适当的 java 源版本。特别是,我的 MANIFEST.MF
有 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
,我的 tycho-compiler-plugin
有 configuration -> [source|target]
都等于 1.7
。这些模块作为带有 OSGI 方面的 Maven 项目导入到 Intellij 中。
每当我重新导入模块的 poms 时,它会将模块中的语言级别设置为 1.5,据我所知这是默认值。 Intellij 在哪里为这些项目选择项目语言级别,以便我可以让它检测到我想要的?
遇到同样的问题。通过添加到 pom.xml:
解决
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
我正在尝试将 Tycho/Maven 项目从 Eclipse PDE 迁移到 Intellij,但我无法让 Intellij 使用适当的 java 源版本。特别是,我的 MANIFEST.MF
有 Bundle-RequiredExecutionEnvironment: JavaSE-1.7
,我的 tycho-compiler-plugin
有 configuration -> [source|target]
都等于 1.7
。这些模块作为带有 OSGI 方面的 Maven 项目导入到 Intellij 中。
每当我重新导入模块的 poms 时,它会将模块中的语言级别设置为 1.5,据我所知这是默认值。 Intellij 在哪里为这些项目选择项目语言级别,以便我可以让它检测到我想要的?
遇到同样的问题。通过添加到 pom.xml:
解决 <properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>