ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Celeste Haseltine <CHaselt...@unifocus.com>
Subject RE: Using Jar update = yes
Date Tue, 11 Nov 2003 15:29:22 GMT
Antoine, 

Thank you for your assistance.  I've been trying to get this ant file
working and get up to speed on this code base in a very short time frame, so
I have not had the time to really learn ant the way I need to.

Thanks again!!!

Celeste

-----Original Message-----
From: Antoine Lévy-Lambert [mailto:antoine@antbuild.com]
Sent: Tuesday, November 11, 2003 1:52 AM
To: Ant Users List
Subject: AW: Using Jar update = yes


Celeste,

You should add an excludes attribute to your jar task invocation to exclude
from the operation the war file which you are trying to update.

 <jar jarfile="${dist}/${app.name}.war" excludes="${dist}/${app.name}.war"
        basedir="${dist}" update="yes">
     </jar>

Actually, you do not need absolutely to use nested filesets.
This is a jar task invocation using nested filesets
(from the doc  : http://ant.apache.org/manual/CoreTasks/jar.html )

 <jar destfile="${dist}/lib/app.jar">
    <fileset dir="${build}/classes"
             excludes="**/Test.class"
    />
    <fileset dir="${src}/resources"/>
  </jar>

I suggest you run your build in verbose mode (ant -verbose) to see why ant
does not find any out of date files in your archive which would require
update.


Antoine

-----Ursprüngliche Nachricht-----
Von: Celeste Haseltine [mailto:CHaseltine@unifocus.com]
Gesendet: Montag, 10. November 2003 18:05
An: 'Ant Users List'
Betreff: RE: Using Jar update = yes


Antoine,

Thanks for the response.  What do you mean by a nested fileset?  Can you not
add new files and update old files in an existing jar by just using the
update=yes property?  Again, I'm working off of an Ant file that someone
else wrote and supposedly worked using Ant 1.4, but now does not work using
Ant 1.5.3.

Thanks again!

Celeste

-----Original Message-----
From: Antoine Lévy-Lambert [mailto:antoine@antbuild.com]
Sent: Monday, November 10, 2003 10:54 AM
To: Ant Users List
Subject: AW: Using Jar update = yes


ant 1.5.3 is all right for updating jars.
It looks like you are not indicating a nested fileset that you want to jar
in unifocus.war.

Cheers,
Antoine

-----Ursprüngliche Nachricht-----
Von: Celeste Haseltine [mailto:CHaseltine@unifocus.com]
Gesendet: Montag, 10. November 2003 17:34
An: 'Ant Users List'
Betreff: Using Jar update = yes


I've searched the mail archive, and I found a number of email addressing
this problem but I did not find a resolution or workaround.  I have an older
build file that I am trying to run inside of Eclipse using Ant version
1.5.3.  The portion of the ant script in question is listed below.

    <!-- Copy war file to bin -->
	<copy file="${unifocus.war}" tofile="${dist}/${app.name}.war"
			overwrite="yes">
    </copy>

  <!-- Update WAR file -->
       <jar jarfile="${dist}/${app.name}.war"
        basedir="${dist}" update="yes">
     </jar>

I can copy the old unifocus.war file into the destination directory, but I
am unable to update it with the revised class files and property files that
are in the destination directory.  I'm relatively new to ant, and I am
working with an old build file that was written by someone else.  Does the
update=yes property of jar work anymore?  If not, is there a workaround or a
new way of merging new class/property files into the original jar, along
with updating existing class/property files in the same existing jar?

Thanks in advance for any advice/assistance.

Celeste Haseltine, PE







---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message