Maybe bump default to at least Java 8 for source/target of
maven-compiler-plugin? Or maybe switch to a default for release instead if
we decide on a Java 11+ runtime requirement for mvn4.

/Anders (mobile)

Den tors 21 juli 2022 20:24Benjamin Marwell <bmarw...@apache.org> skrev:

> Hi everyone,
>
> as discussed in Slack, here are a few ideas for Maven 4.0 Plugin
> default's changes.
> Rationale: Convention over configuration, but things have diverged
> from when Maven 3 was started.
>
> * Set the default Java Source file encoding to UTF-8.
> This seems to receive a broad agreement. Not only is UTF-8 default on
> most platforms nowadays (UTF-16 on Windows), it also aligns with Java
> 18+, most user configurations and getting rid of the annoying warning
> "is platform dependent". Plus, it is 100% compatible with ASCII and
> mostly compatible with other encodings.
>
> * Setting the default javadoc-plugin verbosity to quiet via "quiet=true".
> [1]
> This was the default before Java 1.4.2 anyway, and it will only make
> the list of generated html sites disappear.
>
> * Setting failOnMissingWebXml to "false" by default. Romain suggested
> this was planned for the next major release, but I was not able to
> find an issue about this.
>
> There seems to have been some jira tickets about this, all set to
> resolved+fixed, but I cannot see the actual implementation which made
> it into the plugin. [2], [3]. Setting the default to "false" based on
> the existence of annotations or a dependency might still be a valid
> idea, but this got vastly more complicated, no question. So just
> setting it to "false" might do it, but it will break builds which do
> not use annotations. There are good reasons for this, e.g. using a
> particular startup order for listeners.
>
> That said, I am not sure about the last one unless we can identify
> *for sure* there are *some* kind servlets/listeners etc. present in
> the .war file. My -0.5 on this one unless someone can come up with a
> neat solution.
>
> So, what do you think? Are there more sane defaults we should set for
> Maven 4.0?
>
> - Ben
>
>
> [1]:
> https://maven.apache.org/plugins/maven-javadoc-plugin/test-jar-mojo.html#quiet
> [2]: https://issues.apache.org/jira/browse/MWAR-396
> [3]: https://issues.apache.org/jira/browse/MWAR-262
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
> For additional commands, e-mail: dev-h...@maven.apache.org
>
>

Reply via email to