Why not use VFS for scanning?
If it's the case of having it working in other non-VFS envs,
simply create an abstraction, which checks if VFS is available,
if not, fall-back to non-VFS / jar scanning.
At least that's what I would do, or did for Facelets (for some support patch).
Getting a hold of tmp resources is even uglier, more impl details,
then having a simple and proper VFS impl, over some simple abstarction.