ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicole Luneburg <>
Subject unjar/unzip makes expanded folder read-only
Date Thu, 10 Jul 2008 07:07:48 GMT

Hi all,

I have a war file which I need to:
1. expand
2. replace a file in the expanded war
3. war it up again

(without going into too much detail, no I can't do it at the start when I first war up the

I'm using Windows.
My problem is that when the war is expanded, which creates a folder, that folder is set to
have all the folders within to be read-only (see screenshot here:

Because of this, I cannot replace any file in the expanded war (I.e. it keeps saying Access
I have tried a number of things now like:

<mkdir dir="expandedwar" />
<unjar src="src.war" dest="expandedwar" />
<attrib readonly="false">
  <dirset dir="expandedwar" />
<copy file="file.txt" tofile="expandedwar/file.txt" overwrite="true" />
<!-- jar up expandedwar again -->

2. same as #1 except took out the mkdir since the unjar task creates the dest directory for
me anyway.

3. same as #1 except used unzip instead of unjar

The funny thing is someone else also on Windows is able to simply unjar, copy file, jar up
again (ie exactly like #1 but without the <attrib ... stuff) and it all works fine, just
not for me.

Does anyone know why this occurs?


The contents of this email are confidential and may be subject to legal or professional privilege
and copyright. No representation is made that this email is free of viruses or other defects.
If you have received this communication in error, you may not copy or distribute any part
of it or otherwise disclose its contents to anyone. Please advise the sender of your incorrect
receipt of this correspondence.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message