开发者

Jar sizes different for different people

So, I have an interesting question. I have three people using the same ant build xml file creating a jar file for an Eclipse project that hasn't changed in two months. We each do a build using this xml file and we each get a different sized jar (62 KB, 78 KB, and 10开发者_如何学Go1 KB). Also, when I do a winmerge on them, they are dramatically different.

What could cause this difference?


First thing to try: copy them all onto the same computer, unpack them in different directories, and run WinDiff (or whatever) on the uncompressed version. That will make it much more obvious what's going on.

Other possibilities - different versions of Java using different compression levels by default?


In addition to Jon's suggestion, are there user preferences that ant script may pickup?

E.g. build.properties file that can live in project directory, user home directory, etc.

It may be the case that there are different customizations of the project on each person's workstation.


The only difference I can see can be:

  1. Difference in environment variables resulting in difference in compilers. Does your ant script use any other utility in addition to the regular javac for compilation or packaging? Ex: does it use AspectJ or some other assembling utility? Is that dependent on environmental variables that are different for different machines?
  2. Difference in the size of dependent jars (one of you might have commons-logging-1.8 while the other may have a different version for example)
  3. Do you invoke any other build utility from ant that does dependency management such as ivy for instance?

You said winmerge shows dramatic differences. Are these w.r.t. the size of the various components inside the jar or are there structural differences (folder structures, different files etc.)? The latter would be more perplexing for sure.


Sounds like the folders being jarred together are not empty when the process begins.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜