Friday 24 June 2011

How to Use ANT in salesforce


Hi friends here We will learn How to deal with deployment process using ANT. If you have ANT then fine
other wise download apache-ant-1.8.2 or higher version and go through these steps for installing ANT.
Step 1 Download apache-ant-1.8.2-bin from Web.
step 2 install jdk1.6.0_25 or higher version.
Step 3 go to run command use command sysdm.cpl press "advanced" tab then press "environment variable" tab then system variable section press on
tab "New"

create two variable ANT_HOME and JAVA_HOME
ANT_HOME D:\apache-ant-1.8.2-bin\apache-ant-1.8.2 (if your ant folder is in D- drive)                  
JAVA_HOME C:\Program Files\Java\jdk1.6.0_25 (give path of jdk)
now check there will be a another variable "PATH" in that you need to append these newly created variable's with bin location value separating with semicolon.

PATH append like this oldpath; C:\ProgramFiles\Java\jdk1.6.0_25\jre\bin;D:\apache-ant-1.8.2-bin\apache-ant-1.8.2\bin;
(if path variable is already a variable then append this also other wise create new Path variable)

Step4: Go to Salesforce - Setup -. Tool-> Force.com migration download it.
Step5: Extract this downloded zip folder and copy ant-salesforce jar file and put it in lib folder in apache folder.

for more detail go to
http://ant.apache.org/manual/index.html

Now we move to "How to Use ANT for deployment in Apex"

for this Process
1) First of all create package.xml(depends requirement )
2) And Use build.xml and
3) build.property (change credential according to your requirement)








No comments:

Post a Comment