Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

5
  • 1
    This is simpler than the accepted answer and also was good for me. Commented Nov 30, 2016 at 15:26
  • 1
    This worked for me however the accepted answer did not work. Commented Jun 13, 2017 at 9:06
  • 1
    What's the difference between this and configuring maven-compiler-plugin (as per accepted answer)? Both ways are working for me. Commented Jan 3, 2018 at 6:16
  • If you are using Java 9, be aware that the version numbering has changed. So use 9 instead of 1.9. <properties> <maven.compiler.source>9</maven.compiler.source> <maven.compiler.target>9</maven.compiler.target> </properties> Commented Jun 4, 2018 at 7:57
  • I thought setting a property "java.version" and using it in the build configuration of the "maven-compiler-plugin" configuration was enough. Obviously, "maven.compiler.source" and "maven.compiler.target" properties must have some Eclipse Maven plugin interaction as the problem just vanished. Commented Mar 19, 2019 at 1:55