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

Robbie Gemmell updated ARTEMIS-5752:
------------------------------------
    Description: 
The assembly creation keeps the existing line endings from the checked out 
sources, meaning that when building on some systems the linux script will have 
CRLF endings and then not work correctly when executed on linux. The reverse is 
true of the windows .cmd script but that generally works ok. Though this was 
noticed mostly due to an unexpected git configuration (Related discussion: 
[https://lists.apache.org/thread/lrnkjcbf73bkxlk9j5p9m1pxv5djjh2x] ) the 
assembly creation should be tweaked to avoid the general problem from 
occurring, setting the line endings on those scripts during assembly creation 
so that they are appropriate for the respective systems upon execution.

There are also a handful of files with CRLF line endings in the repo index 
rather than the normalised LF used throughout, flip the endings and renormalise 
so the repo index is consistent.


== Original description ==
-An attempt to fix line endings for windows builds by changing 
maven-assembly-plugin's lineEnd settings and adding .gitattributes file.-
-git --renormalize was also used to change encodings of some files to LF.-

-note: I was not able to change .cmd files' encodings to CRLF in git's index 
...-
-current git ls-files --eol output:-
{code:java}
git ls-files --eol *.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis-utility.profile.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-distribution/src/main/resources/bin/artemis.cmd
i/lf    w/crlf  attr/text eol=crlf      
tests/smoke-tests/src/main/filtered-resources/servers/windowsUpgrade/bin/artemis.cmd
i/lf    w/crlf  attr/text eol=crlf      
tests/smoke-tests/src/main/filtered-resources/servers/windowsUpgradeETC/artemis.profile.cmd{code}
 

 

  was:
An attempt to fix line endings for windows builds by changing 
maven-assembly-plugin's lineEnd settings and adding .gitattributes file.
git --renormalize was also used to change encodings of some files to LF.

note: I was not able to change .cmd files' encodings to CRLF in git's index ...
current git ls-files --eol output:


{code:java}
git ls-files --eol *.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis-utility.profile.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
i/lf    w/crlf  attr/text eol=crlf      
artemis-distribution/src/main/resources/bin/artemis.cmd
i/lf    w/crlf  attr/text eol=crlf      
tests/smoke-tests/src/main/filtered-resources/servers/windowsUpgrade/bin/artemis.cmd
i/lf    w/crlf  attr/text eol=crlf      
tests/smoke-tests/src/main/filtered-resources/servers/windowsUpgradeETC/artemis.profile.cmd{code}
 

 


> Fix line endings
> ----------------
>
>                 Key: ARTEMIS-5752
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5752
>             Project: ActiveMQ Artemis
>          Issue Type: Task
>    Affects Versions: 2.44.0
>            Reporter: Gašper Čefarin
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> The assembly creation keeps the existing line endings from the checked out 
> sources, meaning that when building on some systems the linux script will 
> have CRLF endings and then not work correctly when executed on linux. The 
> reverse is true of the windows .cmd script but that generally works ok. 
> Though this was noticed mostly due to an unexpected git configuration 
> (Related discussion: 
> [https://lists.apache.org/thread/lrnkjcbf73bkxlk9j5p9m1pxv5djjh2x] ) the 
> assembly creation should be tweaked to avoid the general problem from 
> occurring, setting the line endings on those scripts during assembly creation 
> so that they are appropriate for the respective systems upon execution.
> There are also a handful of files with CRLF line endings in the repo index 
> rather than the normalised LF used throughout, flip the endings and 
> renormalise so the repo index is consistent.
> == Original description ==
> -An attempt to fix line endings for windows builds by changing 
> maven-assembly-plugin's lineEnd settings and adding .gitattributes file.-
> -git --renormalize was also used to change encodings of some files to LF.-
> -note: I was not able to change .cmd files' encodings to CRLF in git's index 
> ...-
> -current git ls-files --eol output:-
> {code:java}
> git ls-files --eol *.cmd
> i/lf    w/crlf  attr/text eol=crlf      
> artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis.cmd
> i/lf    w/crlf  attr/text eol=crlf      
> artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis-utility.profile.cmd
> i/lf    w/crlf  attr/text eol=crlf      
> artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/etc/artemis.profile.cmd
> i/lf    w/crlf  attr/text eol=crlf      
> artemis-distribution/src/main/resources/bin/artemis.cmd
> i/lf    w/crlf  attr/text eol=crlf      
> tests/smoke-tests/src/main/filtered-resources/servers/windowsUpgrade/bin/artemis.cmd
> i/lf    w/crlf  attr/text eol=crlf      
> tests/smoke-tests/src/main/filtered-resources/servers/windowsUpgradeETC/artemis.profile.cmd{code}
>  
>  



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to