A quick question: I like the look of this bit of Ant:
<fileset dir="${lib}">
<patternset refid="myPattern" />
</fileset>
So I could use this e.g. to copy a few .jar files from ${lib} that match myPattern.
What if what I really want is to look into each .jar in ${lib} and select only .class files that match myPattern?
I'm pretty sure you'd need to unjar the jars and then do the copy of class files.
This should work with antcontrib's For task
You can use the
archives
resource collection to extract several files from multiple archives:The
unjar
task does pretty much what you want here out of the box. Use afileset
to specify the jar files you want to extract from, and apatternset
to specify which files to extract.