https://bz.apache.org/bugzilla/show_bug.cgi?id=63243

            Bug ID: 63243
           Summary: zipgroupfileset task causes the jar task to rebuilt
                    its target needlessly
           Product: Ant
           Version: 1.9.9
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: major
          Priority: P2
         Component: Core tasks
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: ---

Created attachment 36477
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=36477&action=edit
short self-contained correct example showcasing the problem

Note: I have created a github repo with a SSCCE here:

https://github.com/mperdikeas/jar-zipgroupfileset-problem-SSCCE

I have managed to reproduce this problem in a very minimal setting involving a
very short build.xml file and just three test jar files. The crux of the matter
is that I am trying to create an archive containing all class files found in a
number of jars. For that, as advised in numerous posts on the web, I am using
the Jar task with an embedded zipgroupfileset task in the following
arrangement:

        <jar destfile="out.jar">
            <zipgroupfileset dir="some-jars">
                <include name="a.jar" />
                <include name="b.jar" />
            </zipgroupfileset>                        
        </jar>

The above works perfectly well. The target file (out.jar) is built only once
(the very first time). Subsequent invocations of the target do not cause the
out.jar file to be rebuilt unless one of the Jar files under the "some-jars"
directory have, in the meantime, been updated. However, if I add just one
additional jar file as in:

      <jar destfile="out.jar">
            <zipgroupfileset dir="some-jars">
                <include name="a.jar" />
                <include name="b.jar" />
                <include name="c.jar" />
            </zipgroupfileset>            
        </jar>

Then the output file (out.jar) is created on every single run! I've checked the
dates of the files inside c.jar (in case one of them was some weird time in the
future) but there's nothing untoward. The issue is not with the particular test
jar files used, I've encountered it with different jar files as well.

I include as an attachment the entire SSCCE (that you can also find in the
github project) sans the .git directory.

System Information
------------------
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.1 LTS
Release:        16.04
Codename:       xenial

$ ant -version
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256m;
support was removed in 8.0
Apache Ant(TM) version 1.9.9 compiled on April 21 2017

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to