stop IntelliJ IDEA to switch java language level every time the pom is reloaded (or change the default project language level)

前端 未结 9 1119
悲&欢浪女
悲&欢浪女 2020-11-28 01:59

Using IntelliJ 12, I have a java project and I use maven with a pom.xml. My project is using java8, but it seems the default project language level has been set to 6 while i

9条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-28 02:45

    For me the solution of updating the POM (plugins plus properties) to the required Java compiler version (1_7 in my case) worked. However as the .iml file for each project was generated with original pom (with default compiler version of 1_5 as explained by someone above) has a JDK version of 1_5, this still overrides the pom version.

    I deleted the .idea folder manually and imported the module into IntelliJ with a reimport from the updated pom. When I reimported the Module from updated POM,I could see that the iml files had the updated JDK version (1_7 in my case) .

提交回复
热议问题