Search code examples
mavenpom.xmljgitline-endings

maven jgitflow release-start goal changes line endings to CRLF


I'm working on Windows machine on a project which has line endings set to LF. After the command jgitflow:release-start is run, poms are update with new versions, but also line-endings in poms are changed to CRLF. Just to mention there is a line *.xml text eol=lf in .gitattributes.

Does anyone has idea how to prevent this?


Solution

  • There is a ticket to improve line-endings handling in jGit flow plugin here

    Currently, jgit flow chooses the EOL to use based on the global GIT config for core.eol. In my case adding core.eol=lf solves the problem.