Verifier#assertFileNotPresent() fails when looking for an unwanted jar resource
-------------------------------------------------------------------------------
Key: MSHARED-104
URL: http://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: francisdb
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 contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira