mathieucarbou / license-maven-plugin

Manage license headers in your source files

Home Page:https://oss.carbou.me/license-maven-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support one line headers

Rots opened this issue · comments

Describe the feature

I'd like to add one liners, but the current custom configuration won't allow that complaining that firstLine and lastLine cannot be empty
e.g.

<!-- Copyright XYZ 2022 -->               # in .html
// Copyright XYZ 2022                     # in .ts

Any alternative you've considered ?
a) live with multi line
b) not using this tool

I found

https://github.com/mathieucarbou/license-maven-plugin/blob/license-maven-plugin-4.2.rc3/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java#L43

and

https://github.com/mathieucarbou/license-maven-plugin/blob/license-maven-plugin-4.2.rc3/license-maven-plugin/src/main/java/com/mycila/maven/plugin/license/header/HeaderType.java#L59

the first still adds blank lines before and after the comment, in some cases the first tag gets lost :/
the second mostly works, but other comments at the beginning of the file are also removed :(
I would also need the single line alternatives to all other cases like /** this */

commented

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

Yes, still relevant, but no progress has been made

@Rots : did you try to make your own header template definition ?

Yes, but like I mentioned:

I'd like to add one liners, but the current custom configuration won't allow that complaining that firstLine and lastLine cannot be empty