license-maven-plugin
license-maven-plugin copied to clipboard
remove-file-header does not restore the files to the original state
I was under assumption that "remove-file-header" goal would restore my files to their original state, as they were before using update-file-header. I currently observe (plugin version 1.20) the following issues:
- Generated headers are NOT being removed from the following files in my project: Dockerfile, *.sh
- Removing the header leaves an empty line at the top of each file at least for *.java, *.groovy
How to reproduce:
- create a project with some Java files, .groovy, Dockerfile, .sh
- run "license:update-file-header" - it will populate the license headers
- run "license:remove-file-header"
- note that some files will still have the license header and others will have an empty line at the top
Environment: OpenJDK 11, Mac OS X, Maven 3.6.1, plugin 1.20
A reproducer in form of an integration test under https://github.com/mojohaus/license-maven-plugin/tree/master/src/it would be highly welcome.
The bottom line is that there is no test for remove-file-header
mojo yet, so no wonder that it is broken.