Salesforce支持三种Deployment方式 之 ANT

Salesforce支持三种Deployment方式

1. Outbound change set

2. Eclipse plug in 

3. ANT 

本文介绍使用ANT的基本步骤.

<1> Preparation

1. Ant installed 
2. JAVA installed
3. SVN and Subversion installed
4. Cygwin or MKS
5. JAVA SVN Env Variales added to your computer
6. salesforce-ant.jar in the root folder for the ant installation
7. 7-Zip installed


<2> Steps


1. Create build.properties file:

-----------------------------------------------------------------------------------------
# build.properties
#
# Specify the login credentials for the desired Salesforce organization
sf.username = xxxxx
sf.password =xxxxxx..................................

# Use 'https://www.salesforce.com' for production or developer edition (the default if not specified).
# Use 'https://test.salesforce.com for sandbox.
sf.serverurl = https://www.salesforce.com

# If your network requires an HTTP proxy, see http://ant.apache.org/manual/proxy.html for configuration.
#

-----------------------------------------------------------------------------------------

2. Create package.xml file:

-----------------------------------------------------------------------------------------

?xml version="1.0" encoding="UTF-8"?>

   
        *
        ApexClass
   

   
        *
        ApexTrigger
   
   
    23.0

-----------------------------------------------------------------------------------------


<3> More information can be found about the base level ant preparation in the standard Salesforce documentation:
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_deploying_ant.htm                         
http://www.salesforce.com/us/developer/docs/daas/salesforce_migration_guide.pdf                             


你可能感兴趣的:(Salesforce)