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

前端 未结 9 1125
悲&欢浪女
悲&欢浪女 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:43

    I struggled a lot with this problem, due to building microservices with Dropwizard. Eventually I found out that I had my build properties in the wrong pom file (The main service's pom.xml).

    So, even though the other packages are more like libraries, I were not able to use the Java 8 syntax.

    When I refactored the build plugin into the "global" .pom.xml" file, all child containers were able to use the new syntax.

    May help someone having issues with multi-container projects

提交回复
热议问题