----- Original Message -----
| From: "Stefan Bodewig" <[email protected]>
| To: [email protected]
| Sent: Tuesday, November 29, 2011 4:35:14 AM
| Subject: Re: Rat Maven Plugin - A few comments & questions
| Hi John,
| 
| I can't say I was an expert for the Maven plugin, quite the opposite,
| but I'll try.
| 
| On 2011-11-28, John W Vines wrote:
| 
| > 1. Generated thrift code - I can't seem to get the RAT module
| > working
| > in this regard. They have a common header, so I was hoping to add
| > the
| > "Autogenerated by thrift" header to the licenses so they would be
| > ignored, but I cannot set licenses in the pom. It would be great if
| > I
| > could provide a license in the pom which would be interpreted as
| > such.
| 
| You should be able to make this header detected by using a custom
| license. Once it is detected it doesn't mean it is approved. You have
| to perform both steps documented at
| 
| 
<http://incubator.apache.org/rat/apache-rat-plugin/examples/custom-license.html>

So this is what I want to do, but I can't seem to get it working right. I'm 
trying to use the custom license stuff to get it to ignore generated thrift 
code (I put in a ticket to get it fixed with a patch). I do the following:
              <licenses>
                <license 
implementation="org.apache.rat.analysis.license.SimplePatternBasedLicense">
                  <licenseFamilyCategory>GEN</licenseFamilyCategory>
                  <licenseFamilyName>Generated Code</licenseFamilyName>
                  <notes>I don't know the proper way to do this, I just want to
                    ignore thrift generated code</notes>
                  <patterns>
                    <pattern>.*Autogenerated by Thrift.*</pattern>
                  </patterns>
                </license>
              </licenses>
              <licenseFamily 
implementation="org.apache.rat.license.SimpleLicenseFamily">
                <familyName>Generated Code</familyName>
              </licenseFamily>

I've tried tweaking it numerous different ways, but I can't get it to ignore 
the files. They have the header 
/**
 * Autogenerated by Thrift
 *
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
 */

I've tried trailing wildcards, etc. to see if it works, but nothing.

| 
| > 2. Ignore files by size - I saw in the website that with ant I could
| > do a filter based on file size, but I couldn't find anything in the
| > pom. Does this feature exist?
| 
| Honestly I don't know enough about Maven's resource selection process
| but I think only pattern based includes/excludes are possible for the
| plugin.
| 
| > 3. useEclipseDefaultExcludes while including subProjects - it looks
| > like this successfully ignores the .project, etc. files in teh root
| > of
| > the project, but it does not ignore these files in the subprojects.
| > I
| > don't know if this is a bug or if I am missing something.
| 
| Sounds like a bug to me. It would be good if you could open a JIRA
| ticket (even better if it contained a testcase, and the usual stuff
| you
| tell people who report bugs on Thrift ;-)

Ticket's in, though I missed that part about testcase when I created it...


| 
| > Sorry to just start hurling questions your way,
| 
| No, please keep bringing them here.
| 
| Stefan


John

Reply via email to