{"action":"created","issue":{"url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/56","repository_url":"https://api.github.com/repos/mojohaus/license-maven-plugin","labels_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/56/comments","events_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/56/events","html_url":"https://github.com/mojohaus/license-maven-plugin/issues/56","id":178892677,"number":56,"title":"different line endings on windows and linux","user":{"login":"heapifyman","id":274236,"avatar_url":"https://avatars.githubusercontent.com/u/274236?v=3","gravatar_id":"","url":"https://api.github.com/users/heapifyman","html_url":"https://github.com/heapifyman","followers_url":"https://api.github.com/users/heapifyman/followers","following_url":"https://api.github.com/users/heapifyman/following{/other_user}","gists_url":"https://api.github.com/users/heapifyman/gists{/gist_id}","starred_url":"https://api.github.com/users/heapifyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heapifyman/subscriptions","organizations_url":"https://api.github.com/users/heapifyman/orgs","repos_url":"https://api.github.com/users/heapifyman/repos","events_url":"https://api.github.com/users/heapifyman/events{/privacy}","received_events_url":"https://api.github.com/users/heapifyman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-09-23T14:30:50Z","updated_at":"2016-09-23T17:31:34Z","closed_at":null,"body":"We have a problem with the license-plugin messing up line endings when adding the license header to source files in a mixed windows / unix environment using git for version control.\r\n\r\nLicense information uses unix line endings and comes from a dependency artifact using  `<licenseResolver>classpath:`.\r\n\r\nI also have configured `<canUpdateCopyright>true</canUpdateCopyright>` and `<canUpdateDescription>true</canUpdateDescription>`.\r\n\r\nGit is configured on Linux machines with `core.autocrlf=input` on Windows with `core.autocrlf=true`, thus sources are committed with Unix line endings and converted to Windows line endings when cloning to a Windows machine - as recommended.\r\n\r\nNow, when the license-plugin's update-file-header is run on a windows machine and the source file already has a license header, the license header will be replaced - in fact, only the line endings will be changed from windows style to unix style.\r\nThat in turn lets git think the file has been changed, which leads to the situation, where git and our IDE show every source file with a header as changed, although you haven't actually changed the code.\r\nAs you can imagine, that makes it quite hard to work with git because you can't really see what actual changes will be included in a commit.\r\n\r\nIs there a way we can change this behaviour? Have we maybe misconfigured the plugin?\r\nAs a workaround we now have disabled the license-plugin on windows machines via maven profile but that's hardly an ideal solution.\r\n\r\nAny hints would be appreciated.\r\nThanks in advance.\r\n\r\nP.S.: I have used the command described at http://stackoverflow.com/questions/121392/how-to-determine-the-line-ending-of-a-file/2065154#2065154 to determine the line endings."},"comment":{"url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/comments/249254038","html_url":"https://github.com/mojohaus/license-maven-plugin/issues/56#issuecomment-249254038","issue_url":"https://api.github.com/repos/mojohaus/license-maven-plugin/issues/56","id":249254038,"user":{"login":"heapifyman","id":274236,"avatar_url":"https://avatars.githubusercontent.com/u/274236?v=3","gravatar_id":"","url":"https://api.github.com/users/heapifyman","html_url":"https://github.com/heapifyman","followers_url":"https://api.github.com/users/heapifyman/followers","following_url":"https://api.github.com/users/heapifyman/following{/other_user}","gists_url":"https://api.github.com/users/heapifyman/gists{/gist_id}","starred_url":"https://api.github.com/users/heapifyman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heapifyman/subscriptions","organizations_url":"https://api.github.com/users/heapifyman/orgs","repos_url":"https://api.github.com/users/heapifyman/repos","events_url":"https://api.github.com/users/heapifyman/events{/privacy}","received_events_url":"https://api.github.com/users/heapifyman/received_events","type":"User","site_admin":false},"created_at":"2016-09-23T17:31:34Z","updated_at":"2016-09-23T17:31:34Z","body":"Wow, that was fast.\r\nOne question though, shouldn't the \"\\n\" used in the different FileHeaderTransformers also be replaced?"}}
{"actor":{"display_login":"heapifyman"}}