Closed ppalaga closed 5 years ago
The test fails on windows because the "update-file-header" goal applied to a shell file doesn't place the header after the hashbang.
I have pinpointed the problem to this code in file PropertiesFileHeaderTransformer
The calculation of the end of the prolog (in line 70) uses content.indexOf( getLineSeparator() )
which on windows looks for CR+LF at the end of line. However if the file is encoded with unix EOL (which is common for shell files) it will fail to find the end of prolog.
The problem only happens if you build on a windows machine a shell file that uses unix EOL, so it is restricted to teams with mixed build platforms. I will propose you a fix.
A more general discussion is whether the update file header mojo should use the EOL convention of the building platform or should try to guess the convention used in the file.
See https://ci.appveyor.com/project/ppalaga/license-maven-plugin-g0x55/builds/21547120/job/k2lp03sc6jror7lr