See the man test cases located here:
However, what you are looking for is DeploymentUnit.getMetaDataFile(String)
The former searches relative to WEB-INF/META-INF the latter is at the root of the deployment.
If you were using the VFS outside of a deployer then the usage looks like this:
VFS vfs = VFS.getVFS(anyURL);
VirtualFile jar = vfs.findChild("something.txt");
The jar urls are gone in the current snaphsot. You do not need to go through the URL to read a resource. You can use the openStream method of the VirtualFile:
VirtualFile jar1MF = jar1.findChild("META-INF/MANIFEST.MF"); assertNotNull("jar1!/META-INF/MANIFEST.MF", jar1MF); InputStream mfIS = jar1MF.openStream(); Manifest mf1 = new Manifest(mfIS); Attributes mainAttrs1 = mf1.getMainAttributes(); String title1 = mainAttrs1.getValue(Attributes.Name.SPECIFICATION_TITLE); assertEquals("jar1", title1); jar1MF.close();