Apache Rat
  1. Apache Rat
  2. RAT-127

Print report file location in error message

    Details

    • Type: Wish Wish
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.8
    • Fix Version/s: 0.9
    • Component/s: maven
    • Labels:
    • Environment:
      Windows 7, Maven 3.0.4, Oracle JDK 1.7.0_11, Eclipse

      Description

      When running the RAT 0.8 maven plugin from command line (no POM entry for the plugin) it will print a short error message how many violations it found, but this message could be enhanced by pointing to the report file:

      C:\ws\proj>\ws\apache-maven-3.0.4\bin\mvn -s ..\empty.xml org.apache.rat:apache-rat-plugin:check
      ...
      [INFO] — apache-rat-plugin:0.8:check (default-cli) @ proj —
      ...
      [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default-cli) on project proj: Too many unapproved licenses: 26 -> [Help 1]

      Better:

      [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default-cli) on project proj: Too many unapproved licenses: 26. See target/rat.txt

      1. rat127.patch
        3 kB
        Bernd Eckenfels

        Activity

        Bernd Eckenfels created issue -
        Hide
        Robert Burrell Donkin added a comment -

        Hi Bernd (again)

        I'll review a patch with appropriate tests for 0.9 if contributed very soon, otherwise this have to wait until 0.10

        Robert

        Show
        Robert Burrell Donkin added a comment - Hi Bernd (again) I'll review a patch with appropriate tests for 0.9 if contributed very soon, otherwise this have to wait until 0.10 Robert
        Hide
        Bernd Eckenfels added a comment -

        Took me some time to get that damned SVN work with my Windows (I am not sure if the "native" eol setting in the repository is so good.) Anyway, here is the patch with a new test case and enhanced warning+exception message. It also adds a info() logging line with basic statistics for check goal. I hereby agree that you use this changed code under any license you may like.

        Show
        Bernd Eckenfels added a comment - Took me some time to get that damned SVN work with my Windows (I am not sure if the "native" eol setting in the repository is so good.) Anyway, here is the patch with a new test case and enhanced warning+exception message. It also adds a info() logging line with basic statistics for check goal. I hereby agree that you use this changed code under any license you may like.
        Bernd Eckenfels made changes -
        Field Original Value New Value
        Attachment rat127.patch [ 12570249 ]
        Bernd Eckenfels made changes -
        Description When running the RAT 0.8 maven plugin from command line (no POM entry for the plugin) it will print a short error message how many violations it found, but this message could be enhanced by pointing to the report file:

        C:\ws\proj>\ws\apache-maven-3.0.4\bin\mvn -s ..\empty.xml org.apache.rat:apache-rat-plugin:check
        ...
        [INFO] --- apache-rat-plugin:0.8:check (default-cli) @ proj ---
        ...
        [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default-cli) on project proj: Too many unapproved licenses: 26 -> [Help 1]

        Better:

        [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default-cli) on project proj: Too many unapproved licenses: 26. See target/rat.txt



        The excludes should eighter be contained in the eclipse defaults or have its own dotfile or scm category. A workaround would be to specify the excludes, unfortunatelly there seems to be no expression associated with the exclude property of the mojo.
        When running the RAT 0.8 maven plugin from command line (no POM entry for the plugin) it will print a short error message how many violations it found, but this message could be enhanced by pointing to the report file:

        C:\ws\proj>\ws\apache-maven-3.0.4\bin\mvn -s ..\empty.xml org.apache.rat:apache-rat-plugin:check
        ...
        [INFO] --- apache-rat-plugin:0.8:check (default-cli) @ proj ---
        ...
        [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default-cli) on project proj: Too many unapproved licenses: 26 -> [Help 1]

        Better:

        [ERROR] Failed to execute goal org.apache.rat:apache-rat-plugin:0.8:check (default-cli) on project proj: Too many unapproved licenses: 26. See target/rat.txt
        Hide
        Robert Burrell Donkin added a comment -

        Applied. Many thanks

        Sorry you had to spend so much time battling subversion :-/

        Show
        Robert Burrell Donkin added a comment - Applied. Many thanks Sorry you had to spend so much time battling subversion :-/
        Robert Burrell Donkin made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Robert Burrell Donkin [ robertburrelldonkin ]
        Fix Version/s 0.9 [ 12319071 ]
        Resolution Fixed [ 1 ]
        Hide
        Robert Burrell Donkin added a comment -

        I'll close this in next day or two unless someone beats me to it, or some issue with the fix emerges...

        Show
        Robert Burrell Donkin added a comment - I'll close this in next day or two unless someone beats me to it, or some issue with the fix emerges...
        Robert Burrell Donkin made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Robert Burrell Donkin
            Reporter:
            Bernd Eckenfels
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development