Thanks Phil.
Here's some background [1] which comes from before I was involved with
Drill. What they wanted was for the license header checker to accept, in
.java files,
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
etc.
but reject
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
etc.
Notice the two asterisks that open the Java comment block in the second
form thereby making it a Javadoc comment that will appear in generated
Javadoc. There are no longer any examples of the latter in Drill but
this has been enforced by the addition of the license-maven-plugin.
I got here because I want to remove that plugin, which essentially
duplicates RAT, in favour of another (with exactly the same name :()
that can generate license and notice information for our third party
code. This last task is what I'm really doing, the Javadoc license
header rejection matter is yak shaving that came up on the road.
So my yak shaving question is: if I make RAT Drill's only license header
checker then could I make it reject license headers of the second form?
Even if I can't I'm inclined to make it the only header checker since I
think that it's in any case mandatory and authoritative. But in an
effort to retain the work of the previous Drill developers I'm trying to
preserve what they implemented.
1. https://issues.apache.org/jira/browse/DRILL-6320
On 2024/01/26 14:06, P. Ottlinger wrote:
Hi James,
thanks for reaching out!
Am 26.01.24 um 08:21 schrieb James Turton:
I'd like to ask about a feature to prevent RAT from allowing license
headers to appear inside Javadoc comments (/**) while still requiring
them in Java comments (/*) in .java files. Currently the Drill project
makes use of com.mycila.license-maven-plugin to reject licenses in
Javadoc comments because the developers at the time didn't want
license headers cluttering the Javadoc website that is generated from
the source. Are you aware of a general view on Apache license headers
appearing in Javadoc pages? If preventing them from doing so is a good
idea, could this become a (configurable) feature in RAT?
could you be so kind to provide an example of what you want to achieve
and how your use case looks like?
I'm afraid I do not really understand what you mean with
javadoc-specific licenses?
At the moment we don't have a file specific parsing to exclude comments
- is that what you want to achieve?
On the other hand if a license header is needed per file, it has to be
somewhere in the sources ;)
Thanks,
Phil