ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9106] New: - <patternset> in <unzip> task broken
Date Wed, 15 May 2002 09:40:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9106>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9106

<patternset> in <unzip> task broken

           Summary: <patternset> in <unzip> task broken
           Product: Ant
           Version: 1.5Beta1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: knut@paranor.ch


A nested <patternset> element inside a <unzip> task is used to specify what 
files to unzip from the zip archives selected by <unzip>.  The <paternset> 
element seems to be ignored as <unzip> simply extracts all files from the 
source archives, as if there hadn't been any <patternset>.

The attached test case is a buildfile, which when run creates a zip file 
test.zip with two entries a.xml and b.xml and then tries to extract a.xml only 
from the archive.  However, both a.xml and b.xml are extracted and the target 
fails.

The problem seems to be that <unzip> is backended by 
org.apache.tools.ant.taskdefs.Expand whicn in turn subclasses MatchingTask.  
Expand has a addPatternset(PatternSet set) and MatchingTask has a 
createPatternSet() method.  Now the intended addPatternset(PatternSet set) 
never gets called.

A solution is to override createPatternSet() in Expand.

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message