I had the same problem building with ant. The problem is that duplicate files added to an archive (jar, war, ear, etc.) using the jar, war, or ear tasks are added (or merged) by default. When this occurs the duplicated files are truncated or corrupted. I worked around the problem by the setting the duplicate attribute of the jar task to "preserve". To avoid preserving the wrong file, place the fileset you want to preserve at the beginning of the list of fileset tags.
You can also accomplish the same thing by setting the exlcudes attribute of the fileset tag to the dup file.
Hope this helps.