ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Celeste Haseltine <CHaselt...@unifocus.com>
Subject Updating a jar file
Date Thu, 13 Nov 2003 23:51:35 GMT
I am new to ant, and I know that this is probably a simple fix, but I can't
put my finger on what's wrong the following script:

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

  <!-- Update WAR file This section still is not working-->
	 <jar jarfile="${dist}/${app.name}.war"
excludes="${dist}/${app.name}.war"
        basedir="${dist}" update="yes">
     </jar>

When I run this script, I am able to copy portal.war over to my dist
directory and rename it UnifocusPortal.  But when I attempt to update the
war file with the new/revised classes, while excluding the war file I just
copied, the build fails.  Using the -v option when running ant, I get the
following:

war:
        [copy] Copying 1 file to C:\UnifocusPortal\dist
        [copy] Copying C:\Downloads\portal\bin\portal.war to
C:\UnifocusPortal\dist\UnifocusPortal.war
         [jar] Updating jar since jar manifest has changed
         [jar] BUILD FAILED:
file:C:/UnifocusPortal/webapp/WEB-INF/build.xml:110
: A zip file cannot include itself

I thought that the excludes parameter would exclude the war file from trying
to include itself while I am attempting to update the same file.  What am I
missing here?  

Celeste




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


Mime
View raw message