You need to sign in to do that
Don't have an account?
LoneStar69
running Anonymous apex thru ANT
Guys,
I am looking to execute anonymous apex code thru ANT scripts.
Ended up with this -
<!-- Import macros --><!-- created ant-salesforce.xml using code from https://gist.github.com/afawcett/5843110 -->
<import file="C:\apache-ant-1.9.6-bin\apache-ant-1.9.6\lib\ant-salesforce.xml"/>
<target name="anonyscrpt">
<executeApex username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" rollbackOnError="true">
<![CDATA[
<My Script goes here>
]]>
</executeApex>
</target>
But gives error -
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
BUILD FAILED
The following error occurred while executing this line:
C:\apache-ant-1.9.6-bin\apache-ant-1.9.6\lib\ant-salesforce.xml:20: taskdef class org.missinglink.ant.task.http.HttpClientTask cannot be found
using the classloader AntClassLoader[]
Is this the correct way?
Appreciate if somebody can outline the process of doing this.
Thanks for your help.
I am looking to execute anonymous apex code thru ANT scripts.
Ended up with this -
<!-- Import macros --><!-- created ant-salesforce.xml using code from https://gist.github.com/afawcett/5843110 -->
<import file="C:\apache-ant-1.9.6-bin\apache-ant-1.9.6\lib\ant-salesforce.xml"/>
<target name="anonyscrpt">
<executeApex username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" rollbackOnError="true">
<![CDATA[
<My Script goes here>
]]>
</executeApex>
</target>
But gives error -
[taskdef] Could not load definitions from resource net/sf/antcontrib/antlib.xml. It could not be found.
BUILD FAILED
The following error occurred while executing this line:
C:\apache-ant-1.9.6-bin\apache-ant-1.9.6\lib\ant-salesforce.xml:20: taskdef class org.missinglink.ant.task.http.HttpClientTask cannot be found
using the classloader AntClassLoader[]
Is this the correct way?
Appreciate if somebody can outline the process of doing this.
Thanks for your help.
Just to make sure i understand correctly, are you saying that i cannot use ANT to run anonymous apex in the target?
As a part of deployment I am trying to insert test data into the custom objects.