Yes, by 'assembly build' I meant running Maven, and more specifically the lineEnding setting of maven-assembly-plugin descriptors.
On Wed, 5 Nov 2025 at 11:15, Vilius Šumskas <[email protected]> wrote: > > If by "build" you mean running Maven, then check settings for Maven plugins, > like lineEnding in maven-assembly-plugin for example. Most plugins try to > auto detect line endings, but this could breaks workflows if multiple OS'es > are used. > > -- > Vilius > > -----Original Message----- > From: Gašper Čefarin <[email protected]> > Sent: Wednesday, November 5, 2025 12:59 PM > To: [email protected] > Subject: Re: Problems with artemis bash script line endings on linux > > Hi, > > > thank you for the extensive answer. > I did build it on windows "originally", meaning I did the first build of > 2.45.0-snapshot on windows. I'm regularly using both windows and linux and I > remember building v2.42.0? on linux without any problems with line endings. > So I wanted to double check if this problem is only on my machine, at the > risk of sounding dumb and learning something new. > > I ran git ls-files --eol as suggested and you are right, I see w/crlf in my > output. > > > I don't use WSL but you did mention autocrlf settings ... looks like I > (recently) copied the settings from my custom windows .gitconfig files > without paying too much attention to "autocrlf = true". > > Running git clone again without applying the custom gitconfig works as > expected. > > > Adding .gitattributes sounds like a good idea to me - I'll test some > configurations it together with the (incorrect) autocrlf setting on linux. > I'm thinking that forcing LF would be an issue on older windows machines, but > I just did a quick test on a windows7 (running artemis.cmd) and it runs - the > only issue I can find is that there are no displayed line endings inside > notepad.exe ... I'm not sure what would be the best way to go about it. > > Thanks again! > > > > ________________________________ > From: Robbie Gemmell <[email protected]> > Sent: 05 November 2025 10:51:42 > To: [email protected] > Subject: Re: Problems with artemis bash script line endings on linux > > > To sporočilo izvira izven naše organizacije. Bodite pozorni pri vsebini in > odpiranju povezav ali prilog. > > > > > Given the mention of CRs + dos2unix and 'but today im both building and > running the script on linux', would that mean you were doing it on Windows > originally? When then 'on Linux' subsequently, might that have been e.g under > WSL and accessing repo files originally checked out from the host? > Alternatively, have you played with the eol / autocrlf settings perhaps? > > I dont think any of the typical contributors develops on Windows, so neither > the build or the repository settings really take [m]any steps to account for > line endings. For most of us everything typically appears to be just running > on Linux with the git defaults which typically results in LF in the repo and > thus LF checkouts for most, unless git is configured otherwise . > > If I run "git ls-files --eol > artemis-distribution/src/main/resources/bin/artemis" it shows the index and > working dir file using LF. > > $ git ls-files --eol artemis-distribution/src/main/resources/bin/artemis > i/lf w/lf attr/ > artemis-distribution/src/main/resources/bin/artemis > > I expect if you run it, the result will be different, e.g w/crlf > > (There does look to be 5 files in the repo with CRLF endings in total, > probably originally committed by someone running on Windows, or from someone > copy/pasting a file or bit of content originally with CRLFs) > > We could possibly tweak the assembly build to set the endings on those files, > or commit a .gitattributes to control the checkout, to avoid the issue you > are hitting...it's just not really come up before so there hasnt really been > any need to consider it. > > On Tue, 4 Nov 2025 at 08:46, Gašper Čefarin <[email protected]> > wrote: > > > > I'm not sure if i'm the only one, but i experience these errors when > > building the distribution packages, unzipping and running the "artemis" > > script. > > > > running artemis extracted from .tar.gz: > > > > artemis: line 18: $'\r': command not found > > artemis: line 54: syntax error near unexpected token `$'in\r'' > > 'rtemis: line 54: `case "`uname`" in > > > > from .zip: > > /usr/bin/env: ‘sh\r’: No such file or directory > > > > > > yesterday I solved it with running dos2unix: > > > > xx:/tmp/artemis/apache-artemis-2.45.0-SNAPSHOT/bin$ ./artemis create > > broker --force > > /usr/bin/env: ‘sh\r’: No such file or directory > > xx:/tmp/artemis/apache-artemis-2.45.0-SNAPSHOT/bin$ dos2unix artemis > > dos2unix: converting file artemis to Unix format... > > xx:/tmp/artemis/apache-artemis-2.45.0-SNAPSHOT/bin$ ./artemis create > > broker --force Creating ActiveMQ Artemis instance at: > > /tmp/artemis/apache-artemis-2.45.0-SNAPSHOT/bin/broker > > ... > > > > > > > > but today im both building and running the script on linux (ubuntu 24), and > > i'm experiencing the same problems. Can anyone else confirm that this is an > > actual issue? > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] For further > information, visit: https://activemq.apache.org/contact > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information, visit: https://activemq.apache.org/contact
