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/05/01 18:04:00 UTC

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

     [ https://issues.apache.org/jira/browse/SUREFIRE-2140?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Osipov reassigned SUREFIRE-2140:
----------------------------------------

    Assignee: Michael Osipov

> 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
>            Assignee: Michael Osipov
>            Priority: Major
>
> 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 have 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.
> Expectation: Either Git will be configured to use LS auto or Maven Release Plugin will force LF only.



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