On 2011-02-04, Emily Jiang wrote:

> On Fri, Feb 4, 2011 at 1:09 PM, Lukasz Lenart
> <[email protected]>wrote:

>> 2011/2/4 Emily Jiang <[email protected]>:
>>> Thanks Lukasz,
>>> As you say, RAT is able to validate both license header and URL. There
>> must
>>> be a defect then, as it failed to spot the missing line in the copyright
>>> header of '''Licensed to the Apache Software Foundation (ASF) under one'.
>>> Did I miss anything?

>> Just one must be valid, either header of the license or the URL. So,
>> in your case, the URL is valid, that's way it pass throughout RAT
>> validation.

> I see. Thanks Lukasz. Is it possible to enchance this check to make sure
> both of them are valid?

This would only be an enhancement for your special use case.  In other
cases it would make the check useless.

The code in RAT has always been satisfied with one of the two and this
is for a reason.  Many projects outside of the ASF use the Apache
Software License 2.0 as well and their first line will be different.
See for example
<https://xmlunit.svn.sourceforge.net/svnroot/xmlunit/trunk/xmlunit/src/main/net-core/ISource.cs>
and even inside the ASF there will be variations (and be it on
whitespace or " vs ' differences).

It would be trivial to write a variation of
org.apache.rat.analysis.license.ApacheSoftwareLicense20 that only
matched if both lines are present.  But then you'd still need to tell
whatever integration you use that it should use your variation rather
than the built-in one.  I know you can do that for the Antlib but have
no idea about the Maven plugin and don't think you can do it for the
command line at all.

Stefan

Reply via email to