|What is the correct way to edit zip or archive files in the workspace? [message #670099]
||Thu, 12 May 2011 16:28
| Adam Steiner
Registered: July 2009
I would like to know the correct way to edit the contents of a zip/archive file in the workspace, assuming there is an API in Eclipse that exists beyond what is provided in normal Java API, which is what I'm using now.|
Here is my problem:
I have a WAR file located in the root of an EAR project, and when I finish editing the web.xml (via a plugin I wrote) and repackage the WAR, the project explorer appears to update. However, the deployment descriptor node for the WAR under EAR DD --> Modules --> Binary does not reflect the changes I made to the web.xml file but the repackaged war file does contain the updated web.xml file.
I am updating the contents of the war file with setContents method from IFile and giving an input stream.
All I can tell from debugging is that when the common navigator/project explorer goes to update the model from the changed war file, the JavaEEBinaryComponentLoadAdapter calls getInputStream which has the correct path, but the ZipEntry cannot be retrieved because inside the ZipFile class closeRequested is set to true. This causes the getEntry(String) method in ZipFile to return null.
This causes me to think the way I'm editing/updating the contents of the WAR file might be causing a problem.
Any help is appreciated,
Powered by FUDForum
. Page generated in 0.02151 seconds