You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by pl...@netscape.net on 2004/07/19 21:06:38 UTC

(resend) Differing JAR file sizes from same ant command

(I'm resending this from a different email account as the first email
I sent from my mailblocks account seems to have vaporized....)

For some reason, when I run ant to build one of our programs, 
the resulting executable jar has a different size every time 
I run the ant command. The size only differs by about 100 bytes, 
and the program runs fine, but it is disconcerting that I can't 
get exactly the same file each time I run the same build command. 
 
Has anyone else seen this? This build command I use checks 
out stuff from CVS, compiles it, and assembles the JAR using 
a combination of jar, zip, and the "pack" task. 
 
Thanks, 
  --Paul Lynch 

-- 
Paul Lynch
Aquilent, Inc.
National Library of Medicine


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp

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


Re: (resend) Differing JAR file sizes from same ant command

Posted by Nicolas Mailhot <Ni...@laPoste.net>.
On lun, 2004-07-19 at 15:06 -0400, wrote:
> (I'm resending this from a different email account as the first email
> I sent from my mailblocks account seems to have vaporized....)
> 
> For some reason, when I run ant to build one of our programs, 
> the resulting executable jar has a different size every time 
> I run the ant command. The size only differs by about 100 bytes, 
> and the program runs fine, but it is disconcerting that I can't 
> get exactly the same file each time I run the same build command. 
>  
> Has anyone else seen this? This build command I use checks 
> out stuff from CVS, compiles it, and assembles the JAR using 
> a combination of jar, zip, and the "pack" task. 

The default manifest includes a date I thinks which means one can't
checksum jars and compare two consecutive runs (which is a PITA and I'll
have to check how to inhibit it sometime).

There may be other differences - but 100 bytes seems a bit much.

Cheers,

-- 
Nicolas Mailhot

RE: (resend) Differing JAR file sizes from same ant command

Posted by "W. Sean Hennessy" <sh...@goldenhourdata.com>.
100 bytes at the .class level or a total of 100 bytes for the "packed" result?

You might discover that the source files are different
if keyword expansion is active for CVS checkout.
One example that comes to mind is where const character strings
embed these keywords to expose source file date and version for verification against
the resulting .class or .obj.  This mechanism is often used with a string search against the collection of .class files
for a branded string to allow one to collect as-built versions in a manifest.
If the date formatting is such that a difference in date from one build to the next result
in +- one char each .class file..it could add up.



-----Original Message-----
From: plynchnlm@netscape.net [mailto:plynchnlm@netscape.net] 
Sent: Monday, July 19, 2004 12:07 PM
To: user@ant.apache.org
Subject: (resend) Differing JAR file sizes from same ant command


(I'm resending this from a different email account as the first email I sent from my mailblocks account seems to have
vaporized....)

For some reason, when I run ant to build one of our programs, 
the resulting executable jar has a different size every time 
I run the ant command. The size only differs by about 100 bytes, 
and the program runs fine, but it is disconcerting that I can't 
get exactly the same file each time I run the same build command. 
 
Has anyone else seen this? This build command I use checks 
out stuff from CVS, compiles it, and assembles the JAR using 
a combination of jar, zip, and the "pack" task. 
 
Thanks, 
  --Paul Lynch 

-- 
Paul Lynch
Aquilent, Inc.
National Library of Medicine


__________________________________________________________________
Switch to Netscape Internet Service.
As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups. Download now at
http://channels.netscape.com/ns/search/install.jsp

---------------------------------------------------------------------
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