This does not seem to be a Maven question.
It is even hardly an Ant question.
With jdk*.*
you are expecting wildcard expansion to be performed by the shell. However, this all is not executed by the shell, rather it is executed by Ant. Ant does not do the wildcard expansion, rather passes the original string including the wildcards into cp
, which also does not do the wildcard expansion, rather interprets it literally.
As something toward a solution, may I suggest you use Ant's fileset
to find the file. While you're at it, Ant's copy
may do the copy, which would then be platform-independent (much nicer than using cp
).