-
Notifications
You must be signed in to change notification settings - Fork 126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
trimHeaderLine removes empty lines from license text in html files #347
Comments
It would be highly welcome if a volunteer could extend update-file-header-test-mojo integration test to reproduce the named scenario:
|
I could not reproduce the bug in the integration test. But I attach here a minimal example project license-test.zip, which demonstrates it. Just unzip and run It seems that the issue is somehow related to the setting |
Meaning, I am not familiar enough with this project's test framework. I am not really sure what needs to be changed to create the necessary tests and assertions. Any hints? |
I am currently integrating this plugin into our build pipeline to update license headers and create the THIRD-PARTY file when I came across the same issue affecting XML files. I decided to comment on this issue rather than creating a new issue because it is the exact same issue. I can open a new issue if needed. Thanks for your work, providing this plugin. |
I found another affect related to this issue: I set The Complete plugin configuration. It's an empty project (
This is the complete plugin configuration I am using and changing License header in a properties file after the first run:
License header in the same properties file after the second run (notice the missing
|
I've found a similar issue related to |
Assume your license text looks like this (with a blank line somewhere in the middle):
If you set
trimHeaderLine=true
license-maven-plugin will correctly trim trailing white spaces in Java files (and all other file types where each line of the resulting license header is starting with a comment symbol), e.g.:But in html files, the blank line will be removed when running the
update-file-header
goal a second time.Result of first run - no trailing white spaces, blank line still included:
Result of second run - no trailing white spaces, but blank line is removed:
When setting
trimHeaderLine=false
, the license header will not change between runs for html files.Unfortunately, then you get a trailing whitespace at the empty line in the license header of java files. And then checkstyle complains...
The text was updated successfully, but these errors were encountered: