-
1. Re: Structure deployer cannot access manifest
alesj Mar 4, 2010 8:33 AM (in response to thomas.diesler)Is this a bug, perhaps related to the root not beeing mounted?
Most likely -- see HERE.
public static Manifest getManifest(VirtualFile archive) throws IOException { if (archive == null) throw new IllegalArgumentException("Null archive"); VirtualFile manifest = archive.getChild(JarFile.MANIFEST_NAME); if (manifest == null || !manifest.exists()) { // HERE -- manifest.exists() == false if (log.isTraceEnabled()) log.trace("Can't find manifest for " + archive.getPathName()); return null; } return readManifest(manifest); }
You need an explicit mount -- like explained eariler: http://community.jboss.org/message/529846#529846
It will a bit tricker here, since you wanna use your VFS abstraction.
Meaning your abstraction will have to know wheather it needs to mount or not.
-
2. Re: Structure deployer cannot access manifest
thomas.diesler Mar 4, 2010 8:39 AM (in response to alesj)I found this
http://community.jboss.org/thread/148707
The fix is making the DeclaredStructure extend AbstractVFSArchiveStructureDeployer to ensure the archive is mounted prior to the execution of the determineStructure method.
-
3. Re: Structure deployer cannot access manifest
johnbailey Mar 5, 2010 2:47 PM (in response to thomas.diesler)Extending AbstractVFSArchiveStructureDeployer will require you to define some kind of name matching scheme to keep it from attempting to mount files that don't make sense, like XML files. So if you have archives, you can extends the AbstractVFSArchiveStructureDeployer and it will manage the mounting for you. Please see the latest DeclaredStructure deployer for more details.