ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Jack" <>
Subject <manifest> causes <jar> to rebuild (was RE: JAR/FTP only if ...)
Date Thu, 20 Jun 2002 19:34:24 GMT

	--- Adam Jack <> wrote:
	> I see that FTP will only upload if the timestamps indicate a need, so if
	> I could "only re-JAR if needed" I think I'd be in good shape.

	That should be the default behaviour. Are you saying it recreates the jar
	even if none of the files that go into it are newer than the jar?

I wrote a small build file to test this out, and you seem correct on vanilla
<JAR>. Sadly it seems that the <manifest> entry is causing the rebuild of
the JAR. I suspected it was 'cos I have date/time stamp properties in my
attributes, but even without those, with static content it always seems to
generate a JAR rebuild.

<?xml version="1.0"?>
<project name="TEST" default="test" basedir=".">
	<target name="test">
		<jar jarfile="jar.jar" basedir="src">
				<section name="Yada">
      				<attribute name="Specification-Title"
					value="Something that does not change..." />

ant -debug gives ......


fileset: Setup scanner in dir E:\data\test\src with patternSet{ includes: []
ludes: [] }
      [jar] Updating jar since jar manifest has changed
      [jar] Building jar: E:\data\test\jar.jar
      [jar] adding directory META-INF/
      [jar] adding entry META-INF/MANIFEST.MF
fileset: Setup scanner in dir E:\data\test\src with patternSet{ includes: []
ludes: [] }

I do not know if there is a "better" behaviour for <manifest> checking for
update, since clearly it isn't a file w/ a timestamp (and if it were it's
timestamp would be 'now') -- but could it's output not be compared to that
of the manifest? Less complex -- and perhaps still a better (for me ;-)
default -- could it not just be ignored in the check? I'd rather not create
a new JAR w/ a new manifest if nothing else had changed (even though I
realize that could loose a manifest content change.)



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

View raw message