Hello devs,

since I didn’t find a user mailing list, I’m trying this one – apologies if this is the wrong place.

I have problems excluding files from the license header check. As an example I set up a new maven project. The only files included are the pom and file_which_should_be_excluded.txt file with dummy content.
The pom looks like this:
<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";>
   <modelVersion>4.0.0</modelVersion>
   <groupId>org.example</groupId>
   <artifactId>rat-test</artifactId>
   <version>0.0.1-SNAPSHOT</version>
   <build>
       <plugins>
           <plugin>
               <groupId>org.apache.rat</groupId>
               <artifactId>apache-rat-plugin</artifactId>
               <version>0.10-SNAPSHOT</version>
               <configuration>
                   <excludes>
                       <exclude>file_which_should_be_excluded.txt</exclude>
                       <exclude>*.txt</exclude>
                       <exclude>pom.xml</exclude>
                   </excludes>
               </configuration>
           </plugin>
       </plugins>
   </build>
</project>

To my understanding, there are no files left to check, but mvn rat:check fails with: [ERROR] Failed to execute goal org.codehaus.mojo:rat-maven-plugin:1.0-alpha-3:check (default-cli) on project rat-test: Too many unapproved licenses: 0 -> [Help 1]

The whole rat.txt is at http://pastebin.com/Gy44dGgC, I think the relevant part is:
*****************************************************
Summary
-------
Notes: 0
Binaries: 0
Archives: 0
Standards: 2

Apache Licensed: 0
Generated Documents: 0

JavaDocs are generated and so license header is optional
Generated files do not required license headers

2 Unknown Licenses

*******************************

Why is it 2 Unknown Licenses? Shouldn't that be 0 because I specifically excluded the 2 files? Or did I understand something wrong about the exclusion?

Cheers,
Erik-Lân Do Dinh

Reply via email to