Here is the ant statement –
<java jar="${lib.dir}/selenium-server-standalone-2.8.0.jar" fork="true" spawn="true" />
And I want to do –
<java jar="${lib.dir}/selenium-server-*.jar" fork="true" spawn="true" />
Hence I am not affected with version of jar I am using.
The Ant
javatask doesn’t support regular expressions there. But you can use a fileset to ‘find’ the jar:Then you can refer to the file using the
ant.refid:prefix:If your library directory contains multiple versions of the jar this won’t work: you need to decide which one to chose.
You could look into using a resource collection like
firstto pick just one, but I’m not sure that would necessarily give you the right one.