Summary: | sync does not work with zipfileset | ||
---|---|---|---|
Product: | Ant | Reporter: | kai |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 1.8.2 | ||
Target Milestone: | 1.8.3 | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
kai
2011-07-01 12:37:19 UTC
This seems to be a general problem with <sync> support for resource collections. The following exhibits the same behavior: <target name="test"> <sync todir="tgt"> <mappedresources> <fileset dir="src"/> <globmapper from="*" to="test/*"/> </mappedresources> </sync> </target> Also, according to the documentation, the <sync> task "Synchronize a target directory from the files defined in one or more Resource Collections", however only one resource collection is allowed (multiple <fileset>'s work). The following fails with "Restrict$1 expects exactly one nested resource collection": <target name="test"> <sync todir="tgt"> <mappedresources> <fileset dir="src1"/> <globmapper from="*" to="test1/*"/> </mappedresources> <mappedresources> <fileset dir="src2"/> <globmapper from="*" to="test2/*"/> </mappedresources> </sync> </target> On a final documentation note, it says that "To use a resource collection, the todir attribute must be set", which is very redundant since the todir attribute is required for the <sync> task. Probably a copy/paste from the <copy> task. with svn revision 1151369 sync really supports multiple resource collections (and the todir reference has been removed from the manual). I have a failing AntUnit test based on mappedResources that reproduces the bug, will look into it. should be fixed with svn revision 1151386 |