Hi Maven Devs,

I want to bring up the discussion about the default encoding used in
Maven, specifically Maven 4.0+ (since it's still in alpha it could be
done for that release or possibly wait another decade), we are in
2023, and we still get an encoding warning[1] that should be handled
manually by users, and I think there is general consensus that UTF-8
is the clear winner as the default encoding for the Java platform, the
JEP 400[2] is already  delivered in Java 18, so the Maven project
should also revisit this default setting and change it from the
platform encoding to UTF-8 by default.

Specifically, I'm talking about avoiding including
<project.build.sourceEncoding>[3] and
<project.reporting.outputEncoding>[4] on every project, and possibly
if the POM Model Version 5.0.0[5] is included with Maven 4.x, and
default to UTF-8 [6].

Doing a quick search in GitHub, there are a lot of projects that
explicitly set UTF-8 by default[7], probably more than any other
encoding, and projects that require a different encoding could still
set this property in the project.

Regards,

[1] https://maven.apache.org/general.html#encoding-warning
[2] https://openjdk.org/jeps/400
[3] 
https://cwiki.apache.org/confluence/display/MAVEN/POM+Element+for+Source+File+Encoding
[4] 
https://cwiki.apache.org/confluence/display/MAVENOLD/Reporting+Encoding+Configuration
[5] https://cwiki.apache.org/confluence/display/MAVEN/POM+Model+Version+5.0.0
[6] https://issues.apache.org/jira/browse/MNG-2216
[7] 
https://github.com/search?l=Maven+POM&q=%22%3Cproject.build.sourceEncoding%3EUTF-8%3C%2Fproject.build.sourceEncoding%3E%22+language%3A%22Maven+POM%22&type=code

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to