Re: Custom license

2011-04-08 Thread Jochen Wiedmann
Hi, Christian,

took more than a few days, but now we finally do support custom
license matchers with rat.

See 
http://ci.apache.org/projects/rat/apache-rat-plugin/examples/custom-license.html
for details, but in short you must have something like the following
in your POM:

  

  YASL1
  Yet Another Software License (YASL)
1.0
  
  
Yet Another Software License, 1.0
  

  

A snapshot is deployed to
https://repository.apache.org/content/repositories/snapshots


Jochen


Re: Custom license

2011-03-17 Thread Stefan Bodewig
On 2011-03-17, Jochen Wiedmann wrote:

> I have to admit, it isn't.

The CLI isn't and you will certainly know better than me whether the
Maven plugin can do it, but the Ant task has allowed pluggable licenses
since day 1.

The testCustomMatcherSentToFile target in

uses a matcher (found inline inside the same file).

> 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:

+1

Stefan


Re: Custom license

2011-03-17 Thread sebb
On 17 March 2011 10:03, Jochen Wiedmann  wrote:
> 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:
>
>    
>      all <-- For the ApacheSoftwareLicense20,
> this would be "any" -->
>      
>        Copyright (C) 2011, Foo, Inc.
>        No warranties: This software is distributed
> without any implied, or explicit, warranties.
>      
>    

This will be tedious to edit - would it not be better to have the bare
licence text(s) in separate file(s), referenced by name in the POM?
The license should have a mnemonic associated with the text, so
reports can show which licence is in use.

e.g. AL2, GPL, CPL, TNT, ETC.

> Are you interested to give this a try?
>
>
> Jochen
>
>
>
>
> On Thu, Mar 17, 2011 at 10:43 AM, Christian Grobmeier
>  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)
>


Re: Custom license

2011-03-17 Thread Christian Grobmeier
I am a Maven User :-)
Cool service, thanks :-)

On Thu, Mar 17, 2011 at 11:20 AM, Jochen Wiedmann
 wrote:
> Give me a few days and nag me, if you don't here from me. Which one do
> you need first: Ant, Maven, or CLI?
>
>
> On Thu, Mar 17, 2011 at 11:08 AM, Christian Grobmeier
>  wrote:
>> What you said all makes sense. This is a killer feature
>>
>>> Are you interested to give this a try?
>>
>> Yes, but I have no cycles left to code this myself at the moment :-(((
>>
>> Thanks and thanks for the @since email too!
>> Cheers
>> Christian
>>
>>
>>>
>>>
>>> Jochen
>>>
>>>
>>>
>>>
>>> On Thu, Mar 17, 2011 at 10:43 AM, Christian Grobmeier
>>>  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)
>>>
>>
>>
>>
>> --
>> http://www.grobmeier.de
>>
>
>
>
> --
> I Am What I Am And That's All What I Yam (Popeye)
>



-- 
http://www.grobmeier.de


Re: Custom license

2011-03-17 Thread Jochen Wiedmann
Give me a few days and nag me, if you don't here from me. Which one do
you need first: Ant, Maven, or CLI?


On Thu, Mar 17, 2011 at 11:08 AM, Christian Grobmeier
 wrote:
> What you said all makes sense. This is a killer feature
>
>> Are you interested to give this a try?
>
> Yes, but I have no cycles left to code this myself at the moment :-(((
>
> Thanks and thanks for the @since email too!
> Cheers
> Christian
>
>
>>
>>
>> Jochen
>>
>>
>>
>>
>> On Thu, Mar 17, 2011 at 10:43 AM, Christian Grobmeier
>>  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)
>>
>
>
>
> --
> http://www.grobmeier.de
>



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


Re: Custom license

2011-03-17 Thread Christian Grobmeier
What you said all makes sense. This is a killer feature

> Are you interested to give this a try?

Yes, but I have no cycles left to code this myself at the moment :-(((

Thanks and thanks for the @since email too!
Cheers
Christian


>
>
> Jochen
>
>
>
>
> On Thu, Mar 17, 2011 at 10:43 AM, Christian Grobmeier
>  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)
>



-- 
http://www.grobmeier.de


Re: Custom license

2011-03-17 Thread Jochen Wiedmann
Oh, about the @since question: For simple cases (@since required in
the global Javadoc section), RAT could be used. But my guess is that
you'd like to check methods as well, in which case RAT is much too
simplistic.

Jochen


On Thu, Mar 17, 2011 at 10:43 AM, Christian Grobmeier
 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)


Re: Custom license

2011-03-17 Thread Jochen Wiedmann
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:


  all <-- For the ApacheSoftwareLicense20,
this would be "any" -->
  
Copyright (C) 2011, Foo, Inc.
No warranties: This software is distributed
without any implied, or explicit, warranties.
  


Are you interested to give this a try?


Jochen




On Thu, Mar 17, 2011 at 10:43 AM, Christian Grobmeier
 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)