How to add License header in maven project using java code

665 Views Asked by At

The task would add a license header if the code doesn't have one or replace it otherwise and would remove if needed.

If using command prompt-say user press -r and then enter key, then the license header is removed from all the files and if user presses -a then license is added to all the files and replaces the previous one. I tried license maven plugin but it was not removing the headers and on adding header it automatically adds one after the other everytime. Requirement is now to develop a java code for such thing now.

Is there any way you could help. Thanks

0

There are 0 best solutions below