You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by Erik-Lân Do Dinh <er...@gmail.com> on 2013/05/04 17:10:28 UTC
RAT maven plugin: exclude not working
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
Re: RAT maven plugin: exclude not working
Posted by Robert Burrell Donkin <ro...@blueyonder.co.uk>.
On 05/04/13 16:10, Erik-Lân Do Dinh wrote:
> Hello devs,
Hi Erik
> since I didn’t find a user mailing list, I’m trying this one – apologies
> if this is the wrong place.
We don't have a user list, so this is definitely the right 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?
I'm not sure, but if you are willing to contribute your test code to
Apache and open a JIRA, I'll add an integration test based on this code
and investigate the issue.
Robert
Re: RAT maven plugin: exclude not working
Posted by Robert Burrell Donkin <ro...@blueyonder.co.uk>.
On 05/08/13 17:25, Erik-Lân Do Dinh wrote:
> Hi Robert and Phil,
Hi Erik
> thank you for your responses.
And thanks for your post - feedback from users is essential
> There won't be any JIRA issue because I found out the error's on my side ;)
> I ran maven from eclipse directly with goal rat:check instead of e.g.
> verify; that's why it wasn't picking up any configuration options I
> specified.
I wonder whether improving the logging in this area would be worthwhile...
> Now I've bound rat:check to the verify phase and it uses the exclusions
> I specified.
I'm considering about writing this up in the FAQ...
Opinions...?
Robert
Re: RAT maven plugin: exclude not working
Posted by Erik-Lân Do Dinh <er...@gmail.com>.
Hi Robert and Phil,
thank you for your responses.
There won't be any JIRA issue because I found out the error's on my side ;)
I ran maven from eclipse directly with goal rat:check instead of e.g.
verify; that's why it wasn't picking up any configuration options I
specified.
Now I've bound rat:check to the verify phase and it uses the exclusions I
specified.
Regards,
Erik-Lân
Re: RAT maven plugin: exclude not working
Posted by "P. Ottlinger" <po...@aiki-it.de>.
Hi Erik,
Am 04.05.2013 17:10, schrieb Erik-Lân Do Dinh:
> <excludes>
> <exclude>file_which_should_be_excluded.txt</exclude>
> <exclude>*.txt</exclude>
> <exclude>pom.xml</exclude>
> </excludes>
I don't know your exact file system structure, but maybe you need to
have a different exclusion:
<exclude>**/*.txt</exclude>
How does your project look like? Is it somewhere on github/googlecode to
take a look at?
Yours
Phil