How do I check if a particular class exists in a jar file? I tried available task and it does not seem to work
If there is a way, can I use patterns in it?
For example, I want to check if a class matching pattern **/xyz/foo.class exists in foobar.jar
Any direction appreciated.
The Available task should work, if you give it the exact class name. Here is an example from the Ant manual for available:
I don’t know of any way to search based on a pattern, short of writing your own task. I guess you could use the unjar task to extract the pattern to a temporary directory, and then check if the file exists. For example: