Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Apache Maven Compiler Plugin: IntroductionThe documentation for version 3.13.0 wrote:Also note that at present the default source setting is 1.8 and the default target setting is 1.8, independently of the JDK you run Maven with. You are highly encouraged to change these defaults by setting source and target as described in Setting the -source and -target of the Java Compiler.
NOTE:
Since 3.8.0 the default value has changed from 1.5 to 1.6
Since 3.9.0 the default value has changed from 1.6 to 1.7
Since 3.11.0 the default value has changed from 1.7 to 1.8
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Rob Spoor wrote:The defaults are documented at https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html:
NOTE:
Since 3.8.0 the default value has changed from 1.5 to 1.6
Since 3.9.0 the default value has changed from 1.6 to 1.7
Since 3.11.0 the default value has changed from 1.7 to 1.8
Since they have shown they don't mind changing the default value from one release to another, I'd follow the advice given here: specify them explicitly.
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Experience keeps a dear School, but Fools will learn in no other.
---
Benjamin Franklin - Postal official and Weather observer
Maven version | release date | default value | java release date |
---|---|---|---|
4.0.0-alpha-13 | 2024-03-06 | 17 | 2021-01 Java 17 |
4.0.0-alpha-12 | 2024-01-12 | 8 | 2014-03 Java 8 |
3.9.0 | 2023-01-31 | 8 | 2014-03 Java 8 |
3.8.8 | 2023-03-08 | 7 | 2011-07 Java 7 |
3.3.1 | 2015-03-18 | 7 | 2011-07 Java 7 |
3.2.5 | 2014-12-20 | 6 | 2006-12 Java 6 |
3.2.1 | 2014-02-21 | 6 | 2006-12 Java 6 |
3.1.1 | 2013-10-04 | 5 | 2004-09 Java 5 |