[
https://issues.apache.org/jira/browse/MRELEASE-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248097#comment-17248097
]
Elliotte Rusty Harold commented on MRELEASE-899:
------------------------------------------------
Line endings have no significance in maven's pom.xml. Rewriting them is less
than ideal, but I can't think of any context in which rewriting them matters.
Per the spec, "To simplify the tasks of
[applications|https://www.w3.org/TR/REC-xml/#dt-app], the [XML
processor|https://www.w3.org/TR/REC-xml/#dt-xml-proc] _MUST_ behave as if it
normalized all line breaks in external parsed entities (including the document
entity) on input, before parsing, by translating both the two-character
sequence #xD #xA and any #xD that is not followed by #xA to a single #xA
character."
In other words, as long as you feed the document through a conformant XML
parser, then it really, really doesn't matter.
There are some arcana around character references that refer to line endings,
but that's not what this ticket is about.
> release:prepare should not change the line separator but detect effective
> line separator from pom.xml
> -----------------------------------------------------------------------------------------------------
>
> Key: MRELEASE-899
> URL: https://issues.apache.org/jira/browse/MRELEASE-899
> Project: Maven Release Plugin
> Issue Type: Improvement
> Reporter: Ralph van Etten
> Priority: Major
>
> Currently the plugin use the system property {{line.separator}} when it
> rewrites the pom.xml.
> This causes trouble, because every line in changed, when a project is
> released sometimes under Windows and sometimes under Linux (because of its
> different line separators).
> (http://stackoverflow.com/questions/11868590/maven-release-plugin-and-windows-line-breaks)
> Therefore it would be a nice feature when the plugin would not use the
> systems line separator but the line separator that is already used in the
> pom.xml.
> On the other hand, changing the existing behaviour would maybe, also harm
> someone else.
> Therefore it would be an great feature when there would be an property that
> define the expected behaviour, maybe in the same way it is done by the
> maven-assembly-plugin's property fileSet.lineEnding
> (http://maven.apache.org/plugins/maven-assembly-plugin/component.html#class_fileSet)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)