You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2002/05/15 11:40:17 UTC
DO NOT REPLY [Bug 9106] New: -
in task broken
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>