【问题标题】:Intellij not detecting appropriate Java version in Tycho/Maven buildIntellij 未在 Tycho/Maven 构建中检测到适当的 Java 版本
【发布时间】:2015-09-09 12:30:57
【问题描述】:

我正在尝试将 Tycho/Maven 项目从 Eclipse PDE 迁移到 Intellij,但我无法让 Intellij 使用适当的 java 源版本。特别是,我的MANIFEST.MFBundle-RequiredExecutionEnvironment: JavaSE-1.7,我的tycho-compiler-pluginconfiguration -> [source|target] 两者都等于1.7。这些模块作为具有 OSGI 方面的 maven 项目导入 Intellij。

每当我重新导入模块的 pom 时,它会将模块中的语言级别设置为 1.5,我认为这是默认值。 Intellij 在哪里选择这些项目的项目语言级别,以便我可以检测到我想要的语言级别?

【问题讨论】:

    标签: maven intellij-idea tycho


    【解决方案1】:

    遇到同样的问题。通过添加到 pom.xml 解决:

      <properties>
         <maven.compiler.source>1.7</maven.compiler.source>
         <maven.compiler.target>1.7</maven.compiler.target>
      </properties>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-01-08
      • 2020-12-13
      • 2018-02-12
      • 2018-12-10
      • 2014-07-01
      • 2014-11-11
      • 1970-01-01
      相关资源
      最近更新 更多