Before I run this script, I run setWLSEnv.cmd, and it runs without giving an error and sets the classpath. After this, when I run the above and script, I get:
build.xml:93: Could not create task of type: wldeploy. Common solutions are to use taskdef to declare your task, or, if this is an optional task, to put the optional.jar in the lib directory of your ant installation (ANT_HOME).
I have also tried adding the following to my build.xml: <taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy"/>
However in this case I get an error: build.xml:12: taskdef class weblogic.ant.taskdefs.management.WLDeploy cannot be found
I am getting similar errors in case of wlcompile/wlserver, etc.
This seems to be some classpath problem, but since I am running setWLSEnv.cmd, I do not know what else needs to be put in the classpath.