Maven 2 & 3

Add default encodings section to POM

Details

  • Type: Improvement Improvement
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: 2.0, 2.0.1, 2.0.2, 2.0.3
  • Fix Version/s: 3.1
  • Component/s: POM::Encoding
  • Labels:
    None
  • Complexity:
    Intermediate
  • Number of attachments :
    1

Description

Look at the attached example POM.

Do you see many duplicate configuration properties ('UTF-8') in it? and the names of properties are very inconsistent.

It would be great if:

1) Add a global section which specifies default encodings:

<defaultEncodings>
<!-- Default: UTF-8 -->
<inputEncoding>UTF-8</inputEncoding>
<!-- Will be the same with inputEncoding if not specified. -->
<outputEncoding>UTF-8</outputEncoding>
</defaultEncodings>

2) Make encoding properties in all plugins to be consistent and deprecate old properties. The default values could be:

inputEncoding = ${pom.encoding.input}
outputEncoding = ${pom.encoding.output}

so users can override the default settings easily.

Issue Links

Activity

Hide
Carlos Sanchez added a comment -

if this involves a change to the pom schema has to be postponed to 2.1

Show
Carlos Sanchez added a comment - if this involves a change to the pom schema has to be postponed to 2.1
Hide
Brian Fox added a comment -

Carlos is right, model changes need to be bumped to 2.1

Show
Brian Fox added a comment - Carlos is right, model changes need to be bumped to 2.1
Hide
Benjamin Bentmann added a comment -
Show
Benjamin Bentmann added a comment - There exists a related user proposal at http://docs.codehaus.org/display/MAVENUSER/POM+Element+for+Source+File+Encoding.

People

Vote (17)
Watch (18)

Dates

  • Created:
    Updated: