You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2012/12/17 16:25:13 UTC

[jira] (MSHARED-104) Verifier#assertFileNotPresent() fails when looking for an unwanted jar resource

     [ https://jira.codehaus.org/browse/MSHARED-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed MSHARED-104.
--------------------------------------

       Resolution: Fixed
    Fix Version/s: maven-verifier-1.4
         Assignee: Kristian Rosenvold

Fixed in r1421845
                
> Verifier#assertFileNotPresent() fails when looking for an unwanted jar resource
> -------------------------------------------------------------------------------
>
>                 Key: MSHARED-104
>                 URL: https://jira.codehaus.org/browse/MSHARED-104
>             Project: Maven Shared Components
>          Issue Type: Bug
>          Components: maven-verifier
>    Affects Versions: maven-verifier-1.0, maven-verifier-1.2
>            Reporter: Francis De Brabandere
>            Assignee: Kristian Rosenvold
>             Fix For: maven-verifier-1.4
>
>
> 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!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira