|Summary:||org.apache.tools.ant.launch.Locator.getClassSource not working with JBoss VFS|
|Component:||Core||Assignee:||Ant Notifications List <notifications>|
Description mleneveut 2013-08-07 08:54:59 UTC
This code works well under Tomcat 7 : File sourceJar = Locator.getClassSource(getClass()); But under JBoss AS 7, it returns null. This is due to Jboss returning vfs:/pathToFile/myClass.class instead of file:/... The method Locator.getResourceSource is not handling vfs prefix.
Comment 1 Stefan Bodewig 2013-12-31 13:52:54 UTC
I don't have any idea how JBoss VFS works but guess simply assuming vfs: was the same as file: is way too naive. Unless anybody who knows enough about JBoss VFS steps in and provides us with the necesary information I don't see how we can "fix" it. TBH I'm not even sure there will be a way to create a proper File instance from a VFS URI at all.