You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@creadur.apache.org by Svante Schubert <sv...@gmail.com> on 2012/03/01 12:13:30 UTC

Feedback on RAT Maven plugin (& problem)

Hi guys,

thank you for your work. It is very helpful to have the RAT Maven plugin
to check the sources.

Today I stumbled over an anomaly.

Our nightly build went fine on Ubuntu:
https://builds.apache.org/job/ODFToolkit/28/org.apache.odftoolkit$schema2template/console

[INFO] Building jar: /home/jenkins/jenkins-slave/workspace/ODFToolkit/trunk/generator/schema2template/target/schema2template-0.8.9-incubating-SNAPSHOT-javadoc.jar
[INFO] 
[INFO] *--- apache-rat-plugin:0.7:check (default) @ schema2template ---
*[INFO] Exclude: src/test/resources/examples/odf/*.ref
[PMD] No report found for mojo check


On Windows 7 on the same source revision I got a problem with RAT and a
binary document, which have to explicitly exclude to let the test pass:

[INFO] --- apache-rat-plugin:0.7:check (default) @ schema2template ---
[INFO] Exclude: src/test/resources/examples/odf/*.ref
[INFO]
------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Apache ODF Toolkit ................................ SUCCESS
[2:12.294s]
[INFO] ODF Custom Javadoc Taglets ........................ SUCCESS
[1:32.394s]
[INFO] XML Schema to Template Mapping Tool: Parent POM ... SUCCESS [0.202s]
[INFO] XML Schema to Template Mapping Tool: Library ...... FAILURE
[1:49.980s]
[INFO] XML Schema to Template Mapping Tool: Maven2 Plugin  SKIPPED
[INFO] ODFDOM ............................................ SKIPPED
[INFO] ODF XSLT-Runner ................................... SKIPPED
[INFO] ODF XSLT-Runner Ant Task .......................... SKIPPED
[INFO] ODF Validator ..................................... SKIPPED
[INFO] Simple Java API for ODF (Simple ODF) .............. SKIPPED
[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 5:35.528s
[INFO] Finished at: Thu Mar 01 11:44:17 CET 2012
[INFO] Final Memory: 37M/334M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.rat:apache-rat-plugin:0.7:check (default) on project
schema2template: Too many unapproved licenses: 1 -> [Help 1]

* First how can the nightly build pass and the local build fail? Did we
used different rat-plugins? How can we remove this uncertainty?
To do a test on your own, just check out "svn co -r 1294009
https://svn.apache.org/repos/asf/incubator/odf/trunk" and run "mvn clean
install -Ppedantic"

* Second of all would be possible to list the files that did not pass?
It is not obvious from the output, Help 1 the URL that there is a
target/rat.txt.
* Third, perhaps a Maven problem, but if I run a "mvn rat:check" for our
trunk from command line. Perhaps the exclusion is only for the ID
pedantic? How do you solve this problem in your projects?

Thanks in advance,
Svante


Re: Feedback on RAT Maven plugin (& problem)

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-03-02, Svante Schubert wrote:

> On 01.03.2012 12:32, Stefan Bodewig wrote:
>> On 2012-03-01, Svante Schubert wrote:

>>> On Windows 7 on the same source revision I got a problem with RAT and a
>>> binary document, which have to explicitly exclude to let the test pass:
>> Sounds like <https://issues.apache.org/jira/browse/RAT-81>

>>> [INFO] --- apache-rat-plugin:0.7:check (default) @ schema2template ---
>>> [INFO] Exclude: src/test/resources/examples/odf/*.ref
>> You should give RAT 0.8 a try.
> Not using any version number, so I assume Maven uses the latest version.

0.8 is the latest version.

> Uncertain from the log, which version is being used in the end.

Well, the snippet above says 0.7.

>>> * First how can the nightly build pass and the local build fail?
>> Because they use different VMs with different behavior in the face of
>> encoding errors.
> Like the binary is not being detected in Windows?

Possible, yes.

> The issue is written for Ubuntu, there everything is fine.

I couldn't reproduce it on Ubuntu either, but still it has been
encountered.  This really is more of a VM issue than a OS issue, or more
accurately a class library issue.  IBM's classlibs throw exceptions in
cases where OpenJDK's classlib replaces unencodable characters with '?'
and Sun/Oracle's classlibs seem to depend on the OS.

I'd really give RAT 0.8 a try.

> I assume the KEYS text file is ignored by default. If this is the
> case, shouldn't this be mentioned in the documentation?

It is not ignored, it gets reported as NOTE - just like NOTICE or
LICENSE and a couple of other files

<http://svn.apache.org/repos/asf/incubator/rat/main/trunk/apache-rat-core/src/main/java/org/apache/rat/document/impl/guesser/NoteGuesser.java>

Stefan

Re: Feedback on RAT Maven plugin (& problem)

Posted by Svante Schubert <sv...@gmail.com>.
On 01.03.2012 12:32, Stefan Bodewig wrote:
> On 2012-03-01, Svante Schubert wrote:
>
>> On Windows 7 on the same source revision I got a problem with RAT and a
>> binary document, which have to explicitly exclude to let the test pass:
> Sounds like <https://issues.apache.org/jira/browse/RAT-81>
>
>> [INFO] --- apache-rat-plugin:0.7:check (default) @ schema2template ---
>> [INFO] Exclude: src/test/resources/examples/odf/*.ref
> You should give RAT 0.8 a try.
Not using any version number, so I assume Maven uses the latest version.
Uncertain from the log, which version is being used in the end. Might be
listed in the end with the list of wrong files at one place.
>> * First how can the nightly build pass and the local build fail?
> Because they use different VMs with different behavior in the face of
> encoding errors.
Like the binary is not being detected in Windows? The issue is written
for Ubuntu, there everything is fine. I fear it is something different.
I assume the KEYS text file is ignored by default. If this is the case,
shouldn't this be mentioned in the documentation?
>
>> * Second of all would be possible to list the files that did not pass?
> Maven is not really an area of expertise for me.  The projects I'm
> involved in use Ant or they use rat:report rather than check and get the
> list as part of the report.
Okay, thank you, Stefan!
Have a nice week-end!
Svante

Re: Feedback on RAT Maven plugin (& problem)

Posted by Stefan Bodewig <bo...@apache.org>.
On 2012-03-01, Svante Schubert wrote:

> On Windows 7 on the same source revision I got a problem with RAT and a
> binary document, which have to explicitly exclude to let the test pass:

Sounds like <https://issues.apache.org/jira/browse/RAT-81>

> [INFO] --- apache-rat-plugin:0.7:check (default) @ schema2template ---
> [INFO] Exclude: src/test/resources/examples/odf/*.ref

You should give RAT 0.8 a try.

> * First how can the nightly build pass and the local build fail?

Because they use different VMs with different behavior in the face of
encoding errors.

> * Second of all would be possible to list the files that did not pass?

Maven is not really an area of expertise for me.  The projects I'm
involved in use Ant or they use rat:report rather than check and get the
list as part of the report.

Stefan