0

I would like to check for the presence of a valid license header in our Java source code using the com.mycila:license-maven-plugin

The issue is currently that most files contain additional text - besides the license - in the initial comment. Several programmers obviously added the class' name (plus an empty line) before the license (maybe that was also done automatically by an earlier IDE), others added additional details about the class after the license header.

Since I don't want to omit that extra text I am seeking for a possibility or option to check for the presence of the exact license header content but allow at least for additional leading text (which should be ignored otherwise).

The cases which contain additional text after the license are not too frequent, so here I could imagine to manually split those into two comments.

It would be great if the plugin would only check that the license header is contained in the first comment, not that the first comment it is completely identical to the predefined header.

Is that feasible?

mmo
  • 3,897
  • 11
  • 42
  • 63

0 Answers0