I'm attempting to use ant to deploy an ear to a weblogic server.
I started with the following :
<target name="deploy">
<taskdef name="wldeploy" classname="weblogic.ant.taskdefs.management.WLDeploy">
<wldeploy action="deploy" name="projName" source="proj.ear" user="user" password="pass" adminurl="localhost:8050" targets="mytarget"/>
</target>
However, this gave me the the following error :
taskdef class weblogic.ant.taskdefs.management.WLDeploy cannot be found using the classloader AntClassLoader[]
To solve this, I modified my taskdef to include the path to the weblogic jar. However, now I'm receiving this error :
[wldeploy] weblogic.Deployer -debug -verbose -noexit -name TPD -source C:\Program Files (x86)\Jenkins\jobs\PROJ\workspace\target\dist\proj.ear -targets mytarget -adminurl localhost:8050 -user user -password pass -deploy
[wldeploy] C:\Program Files (x86)\Jenkins\jobs\PROJ\workspace\build.xml:574: java.io.IOException: Cannot run program "D:\jdk1.7\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
(The above is generated by Jenkins hosted on a Windows box).
I have a feeling this is being caused by the weblogic jar creating a classpath that's too large for Windows command prompt but my inexperience with Ant is giving me doubts. I've looked into using manifestclasspath, but again inexperience is preventing me from effectively implementing it.
What would be a good workaround for this?