I need to unzip a war file in tomcat/webapps directory using ANT build script. The war file name is not fixed. How can I unzip it in a directory whose name is the same as the war file name. I know how to unzip the file but the problem is it unzips the content in the specified destination directory. What if I don't know the directory name?
before build:
tomcat/webapps/
myApp-0.1.war
after the build:
tomcat/webapps
myApp-0.1/
myApp-0.1.war