You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2023/01/07 19:48:00 UTC

[jira] [Created] (SUREFIRE-2140) Cannot release Surefire on Windows

Michael Osipov created SUREFIRE-2140:
----------------------------------------

             Summary: Cannot release Surefire on Windows
                 Key: SUREFIRE-2140
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2140
             Project: Maven Surefire
          Issue Type: Bug
    Affects Versions: 3.0.0-M7
            Reporter: Michael Osipov


While trying to release Surefire on Windows today Git failed with: fatal: CRLF would be replaced by LF in pom.xml

It turns out that the {{.gitattributes}} is:
{noformat}
# Auto detect text files and perform LF normalization
* text eol=lf

*.xml    text diff=xml
*.java   text diff=java
*.html   text diff=html
*.vm     text
*.fml    text
*.md     text
*.css    text
*.js     text
*.sql    text
*.png    binary
{noformat}

I don't know why LF is enforced, but most Git clients will perform {{autocrlf}} and Maven Release Plugin will use platform line separator. Therefore, it will has CRLF after transformation and Git fails, thus release fails. I had to perform in Git Bash:
{noformat}
git status | grep modified: | cut -c13-  | xargs -I^ dos2unix ^
{noformat}

through several stages to continue with the release.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)