[ 
https://issues.apache.org/jira/browse/MSHARED-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17959203#comment-17959203
 ] 

Matthias Bünger commented on MSHARED-104:
-----------------------------------------

This project has moved from Jira to GitHub Issues. This issue was migrated to 
[apache/maven-verifier#110|https://github.com/apache/maven-verifier/issues/110].
 

> Verifier#assertFileNotPresent() fails when looking for an unwanted jar 
> resource
> -------------------------------------------------------------------------------
>
>                 Key: MSHARED-104
>                 URL: https://issues.apache.org/jira/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
>            Priority: Major
>             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 was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to