I have to admit, it isn't.

However, I see this as a very important addition. If RAT ever wants to
be useful outside the ASF, then this needs to be done:

- Licenses (instances of org.apache.rat.analysis.IHeaderMatcher) must
be pluggable.
- For simple cases it should not be required to write a Java class,
but simply to configure a small piece of text, which needs to be
present. (See the
org.apache.rat.analysis.license.ApacheSoftwareLicense20 for an
example.)
- In other words, "pluggable" means that you need to be able to write
a plugin once and add it multiple times using suitable configuration
values.
- For Ant, and Maven, the plugin would be added through the respective
build scripts. (build.xml, and pom.xml)
- For the CLI, it must be possible to load an XML file, which declares
the plugins.

To give an example, I can imagine something like this in a pom.xml:

    <license class="org.apache.rat.analysis.license.SimpleCustomLicense">
      <matchType>all</matchType> <-- For the ApacheSoftwareLicense20,
this would be "any" -->
      <headerLines>
        <headerLine>Copyright (C) 2011, Foo, Inc.</headerLine>
        <headerLine>No warranties: This software is distributed
without any implied, or explicit, warranties.</headerLine>
      </headerLines>
    </license>

Are you interested to give this a try?


Jochen




On Thu, Mar 17, 2011 at 10:43 AM, Christian Grobmeier
<grobme...@gmail.com> wrote:
> Hello,
>
> is RAT already able to check for a custom license?
>
> The license of my customer is a text block in at java doc class level
> (first lines).
>
> I would love to use RAT for this - is it supported?
>
> Also @since tags are necessary. Is it better to use checkstyle for this?
>
> Cheers,
> Christian
>



-- 
I Am What I Am And That's All What I Yam (Popeye)

Reply via email to