ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47117] New: Concat resource doesn't calculate its size
Date Wed, 29 Apr 2009 13:20:53 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47117

           Summary: Concat resource doesn't calculate its size
           Product: Ant
           Version: 1.8Alpha (nightly)
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Core tasks
        AssignedTo: notifications@ant.apache.org
        ReportedBy: st_lazarov@yahoo.com


Currently the following code
        <length>
            <concat>
                <fileset file="*"/>
            </concat>
        </length>
will return Resource.UNKNOWN_SIZE, i.e. print
"[length] Size unknown for concat ..."
Instead, it should return the size in bytes of the output stream resulted in
concatenating the resources specified in "concat"
The current behavior is due to ConcatResource not overriding getSize() (most of
the classes extending Resource do that)
The difficulty with ConcatResource compared to other Resources is that
ConcatResource should effectively be executed before we are able to get its
length. However, this shouldn't be an issue because we meant exactly that with
the sample code provided above. 
That is, for some tasks that can be used as resources seems to be normal the
tasks to be executed before they can be used as resources.
If we don't provide this enhancement, the users will be forced to workaround in
a similar way: they will execute the task (in the above case - output the
concatenation in a file) and then use the output of the task as a resource.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message