Re: Custom license
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: licenses license implementation=org.apache.rat.analysis.license.SimplePatternBasedLicense licenseFamilyCategoryYASL1/licenseFamilyCategory licenseFamilyNameYet Another Software License (YASL) 1.0/licenseFamilyName notes/notes patterns patternYet Another Software License, 1.0/pattern /patterns /license /licenses A snapshot is deployed to https://repository.apache.org/content/repositories/snapshots Jochen
Re: Custom license
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 matchTypeall/matchType -- For the ApacheSoftwareLicense20, this would be any -- headerLines headerLineCopyright (C) 2011, Foo, Inc./headerLine headerLineNo 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)
Re: Custom license
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 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)
Re: Custom license
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 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) -- http://www.grobmeier.de
Re: Custom license
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 grobme...@gmail.com 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 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) -- http://www.grobmeier.de -- I Am What I Am And That's All What I Yam (Popeye)
Re: Custom license
I am a Maven User :-) Cool service, thanks :-) On Thu, Mar 17, 2011 at 11:20 AM, Jochen Wiedmann jochen.wiedm...@gmail.com 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 grobme...@gmail.com 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 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) -- http://www.grobmeier.de -- I Am What I Am And That's All What I Yam (Popeye) -- http://www.grobmeier.de
Re: Custom license
On 17 March 2011 10:03, Jochen Wiedmann jochen.wiedm...@gmail.com 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: license class=org.apache.rat.analysis.license.SimpleCustomLicense matchTypeall/matchType -- For the ApacheSoftwareLicense20, this would be any -- headerLines headerLineCopyright (C) 2011, Foo, Inc./headerLine headerLineNo warranties: This software is distributed without any implied, or explicit, warranties./headerLine /headerLines /license 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 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)