If I create default empty based on no archetype Maven
project in Eclipse
, it will be based on J2SE-1.5
.
I am to change manually both Build Path entry and code compliance.
Why?
How to make it be other?
The Compiler Plugin is used to compile the sources of your project. Since 3.0, the default compiler is javax. tools. JavaCompiler (if you are using java 1.6) and is used to compile Java sources.
If there's some dependency that you can't update due to compatibility issues in your project than leave it as is. Chances are that it just runs fine with Java 11. Hint: You can speed up multi-module Maven projects by using parallel builds, e.g. mvn -T 4 compile compiles all modules in parallel on 4 CPU cores.
@axtavt is right, add source level configuration to your project. But do not configure maven-compiler-plugin
, simply put this properties into pom.xml
.
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
After this refresh maven configuration in Eclipse.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With