[ 
https://issues.apache.org/jira/browse/MRELEASE-899?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17248528#comment-17248528
 ] 

Alexander Kriegisch edited comment on MRELEASE-899 at 12/13/20, 8:09 AM:
-------------------------------------------------------------------------

Another finding alleviating the pain of this problem is that when using the 
more recent combination of
 * Maven Release Plugin from 2.5.2 to 3.0.0-M1,
 * Maven SCM Provider JGit from 1.9.4 to 1.11.2,
 * JGit from 3.7.1.201504261725-r to 5.10.0.202012080955-r,

the problem I personally had with Git for Windows and my setting "check out as 
is, commit Unix line endings" disappears because newer JGit versions can read 
global system settings of Git for Windows correctly, which previously it failed 
to do, hence not honouring them and committing the wrong way, causing full file 
diffs. See also [this comment for Git for Windows issue 
#337|https://github.com/git-for-windows/git/issues/337#issuecomment-743970276].

In other constellations, e.g. "check in + out as is", this would still not work 
and the solution I just mentioned above about conserving existing line endings 
would help.


was (Author: kriegaex):
Another finding alleviating the pain of this problem is that when using the 
more recent combination of
 * Maven Release Plugin from 2.5.2 to 3.0.0-M1,
 * Maven SCM Provider JGit from 1.9.4 to 1.11.2,
 * JGit from 3.7.1.201504261725-r to 5.10.0.202012080955-r,

the problem I personally had with Git for Windows and my setting "check out as 
is, commit Unix line endings" disappears because newer JGit versions can read 
global system settings of Git for Windows correctly, which previously it failed 
to do, hence not honouring them and committing the wrong way, causing full file 
diffs.

In other constellations, e.g. "check in + out as is", this would still not work 
and the solution I just mentioned above about conserving existing line endings 
would help.

> 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)

Reply via email to