jar task with duplicate="preserve"

Dave Brosius <[email protected]> Tue, 15 Sep 2020 01:52:17 -0400
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <[email protected]>
Hi folks,


I have an ant task using ant 1.10.8, that includes use of the <jar> task 
as such:


         <jar destfile="${target.dir}/aspects.jar" *update="true" 
**duplicate="preserve"*>
             <zipfileset src="${target.dir}/pre_aspects.jar" 
includes="**/*" />
             <manifest>
                 <attribute name="Bundle-ManifestVersion" value="2" />
                 <attribute name="Bundle-Name" 
value="${ant.project.name}" />
                 <attribute name="Bundle-SymbolicName" 
value="${ant.project.name}" />
                 <attribute name="Bundle-Version" 
value="${release.version}" />
                 <attribute name="Import-Package" 
value="${bundle.importpackages}" />
                 <attribute name="Export-Package" 
value="${bundle.exportpackages}" />
                 <attribute name="Revision" value="${revision}" />
                 <attribute name="Implementation-Version" 
value="${acme.specification.version}" />
             </manifest>
         </jar>

There are in fact file collsions between the two jars.

When i run this from linux, with the -d parameter, ant outputs the 
correct list of files it is copying, ie, those files that don't already 
exist in the target jar.

When i run this from windows, with the -d parameter, ant outputs a much 
longer list of files it is copying, including files that are being 
overwritten.


So on linux it is working as expected, but windows does something different.

Is it possible that on windows, there is some problem with directory 
separators, maybe / vs \ that is causing the jar task to think these are 
new files. Or perhaps something else? Has anything like this been reported?

thanks,

dave