Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 14 Next »

Currently, the character encoding for source files needs to be configured individually for each and every plugin that processes source files.

Life would become easier if there was a dedicated POM element like ${} which could be used to specify the encoding once per entire project. Every plugin could use it as default value:

Adding this element to the POM structure can only happen in Maven 2.1. For Maven 2.0.x, the value can be defined as a property, thus plugins could immediately use ${} expression, whatever Maven version is used.

default value

Without default value for source encoding, platform encoding is used, which is bad for build reproducibility. Then setting a default value consistently across every Maven plugin will improve build reproducibility.

Proposed default value: ISO-8859-1 which must be supported by every JVM (see java.nio.Charset).

This default value can be coded in POM model for 2.1.x

and in super-pom in Maven 2.0.x:

A check has to be coded in every plugin too, in case Maven version used at runtime does not contain the default value:

plugins to modify

Affected Apache plugins:

  • maven-changes-plugin (velocity template processing)
  • maven-compiler-plugin (source processing)
  • maven-invoker-plugin (beanshell script evaluation): MINVOKER-30
  • maven-javadoc-plugin (source processing)
  • maven-jxr-plugin (source processing)
  • maven-plugin-plugin (javadoc extraction, java source generation): MPLUGIN-101, MPLUGIN-100
  • maven-pmd-plugin (source analysis)
  • maven-resources-plugin (contents filtering)

Affected Codehaus plugins:

  • modello-maven-plugin/modello-core (java source generation)
  • plexus-maven-plugin (javadoc extraction)
  • shitty-maven-plugin (groovy script evaluation)
  • taglist-maven-plugin (javadoc extraction)


Please see [0] for the related thread from the mailing list, and [1] for some further descriptions.



  • No labels