• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

creating same file twice - size differs

 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using ant script to create war file.

While creating same war file twice I find that the sizes of the resultant war files are different.

Is there a way by which this issue can be fixed.

Kind Regards,
Joshua
 
Master Rancher
Posts: 43045
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In what way do the files differ? Surely, if the overall size is different, then there must be at least one file inside of it that has a different size?
 
Joshua Antony
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The length is same. I tested it by printing the length in the standard output.

I used a folder comparison software to find exactly where things went wrong.
It showed that the content of jar file was a mismatch.
So I extracted the jars and then compared it again but the extracted files did not have any difference.

So I guess the problem lies on the archiving task of ant i.e <jar>.
So Is there any way by which I can get consistent ouput for the same.

Kind Regards,
Joshua
 
Ranch Hand
Posts: 2108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to identify exactly what is different about them.

If the difference is the time the file was created, then you can never make them exactly the same.

Some file/folder compare softwares include the time/date in their compare. Some of these software allows to exclude in the compare process, the time/date factor.
 
reply
    Bookmark Topic Watch Topic
  • New Topic