|Update Project Explorer with new contents of war file [message #669293]
||Mon, 09 May 2011 19:09
| Adam Steiner
Registered: July 2009
I wrote a plugin to extract the contents of a war file and repackage the war file with changes my plugin made to the web.xml file.|
I have an enterprise application project, this project has a war file as a reference. The war file is located at the root level of the enterprise application project.
When the war file is repackaged, the deployment descriptor node under the binary module folder of the enterprise application project does not pickup my changes made to the web.xml file in the project explorer. The war file in the workspace however does contain the changes I made to the web.xml file.
Any suggestions as to what I'm doing wrong?
The unpacking of the war file is done to a temp directory and the web.xml changes are made in the temp directory. The contents of the temp directory are then written out to a temporary zip file. An InputStream is gotten from the temporary zip file and is used to write back to the original war file using ((IFile)warResource).setContents() method which I pass FileInputStream, true, true, (instance of IProgressMonitor).
The use of the setContents method makes it a workspace aware operation, right?
This whole process is done inside of a WorkspaceJob.
Powered by FUDForum
. Page generated in 0.04656 seconds