I've had problems with updating JAR files in the past when the "updated" file 
is in fact older than the one already in the archive (and "older" may mean 
"newer within 2 seconds" on Windoze). So you may want to <touch> it first. Or 
as Jan suggested, do an <unear>, then <copy overwrite="true"> for your 
application.xml, then <ear> it back up again.

Hope this helps
Keith


-----Original Message-----
From: Charl Gerber [mailto:[EMAIL PROTECTED] 
Sent: 07 October 2005 14:17
To: Ant Users List
Subject: Re: AW: Problem updating application.xml


I can update war and jar files withing the ear, but
not the application.xml. So this does look fishy. Here
is my (current) ant code:

<jar jarfile="${sonora.ear.destination}" 
     basedir="./lib"      
     includes="*.jar"
     update="true" >
    <metainf casesensitive="true" 
             file="./src/META-INF/application.xml">
    </metainf>   
</jar>

This updates all the jars, as expected, but not the application.xml.



--- [EMAIL PROTECTED] wrote:

> <unear>
> -- modify --: <filterchain>, <replaceregexp>,
> <mapper>, xmltask [1]
> <ear>
> 
> 
> Jan
> 
> [1] http://ant.apache.org/external.html#xmltask
> 
> 
> >-----Ursprüngliche Nachricht-----
> >Von: Charl Gerber [mailto:[EMAIL PROTECTED]
> >Gesendet: Freitag, 7. Oktober 2005 12:47
> >An: user@ant.apache.org
> >Betreff: Problem updating application.xml
> >
> >I have a 3rd party .ear file that I am updating.
> The original
> >.ear has an "application.xml" file. I have tried
> everything,
> >but cannot get Ant to overwrite that
> application.xml with a
> >new one I made myself.
> >
> >I have tried the ear, jar and zip taks,
> update=true, metainf
> >settings, zipfileset, everything... but no luck.
> >
> >If I manually delete the original application.xml
> in the
> >original .ear with, eg, winzip, then ant puts the
> new
> >application.xml where it should goes, but it seems
> that if ant
> >finds an existing application.xml, you can forget
> about.
> >
> >Anyone else had this problem? Is there a
> workaround?
> >
> >Thanks.
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail:
> [EMAIL PROTECTED] For
> >additional commands, e-mail:
> [EMAIL PROTECTED]
> >
> >
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to