Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » What is the correct way to edit zip or archive files in the workspace?(Project Explorer is not reflecting changes made to web.xml in war file)
What is the correct way to edit zip or archive files in the workspace? [message #670099] Thu, 12 May 2011 16:28
Adam Steiner is currently offline Adam SteinerFriend
Messages: 4
Registered: July 2009
Junior Member
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,
Previous Topic:Tabbed Properties View always shows "Properties are not available"
Next Topic:Released Plugin not visible in Eclipse Plugin Installer
Goto Forum:

Current Time: Mon Jun 25 08:23:31 GMT 2018

Powered by FUDForum. Page generated in 0.01903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top