Maven Shared Components
  1. Maven Shared Components
  2. MSHARED-104

Verifier#assertFileNotPresent() fails when looking for an unwanted jar resource

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: maven-verifier-1.0, maven-verifier-1.2
    • Fix Version/s: maven-verifier-1.4
    • Component/s: maven-verifier
    • Labels:
      None

      Description

      when using Verifier#assertFileNotPresent() to assert that a file is not present inside a jar, the assertion always fails.

      This is because looking for the resource throws a FileNotFoundException which is not catched at the correct place. The code that performs the actual test is never run. The exception should be catched and validated to the "wanted" parameter.

      This can be reproduced like this:

      // always fails even if the file is not present
      verifier.assertFileNotPresent("target/test.jar!/missing.xml");

      I suggest creating a unit test to test this case!

        Activity

        Francis De Brabandere created issue -
        Hide
        Kristian Rosenvold added a comment -

        Fixed in r1421845

        Show
        Kristian Rosenvold added a comment - Fixed in r1421845
        Kristian Rosenvold made changes -
        Field Original Value New Value
        Fix Version/s maven-verifier-1.4 [ 17432 ]
        Assignee Kristian Rosenvold [ krosenvold ]
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Closed [ 6 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:14:21 UTC 2015 [ 1428239661755 ]
        Mark Thomas made changes -
        Workflow jira [ 12726109 ] Default workflow, editable Closed status [ 12764496 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 01:15:59 UTC 2015 [ 1428282959282 ]
        Mark Thomas made changes -
        Workflow jira [ 12963882 ] Default workflow, editable Closed status [ 12999854 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        1273d 5h 6m 1 Kristian Rosenvold 17/Dec/12 09:24

          People

          • Assignee:
            Kristian Rosenvold
            Reporter:
            Francis De Brabandere
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development