现在的位置: 首页 > 综合 > 正文

Salesforce支持三种Deployment方式 之 ANT

2013年03月21日 ⁄ 综合 ⁄ 共 1728字 ⁄ 字号 评论关闭

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<Optional>
4. Cygwin or MKS<Optional>
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<Zip static resources to UNIX format, Optional>

<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"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>ApexClass</name>
    </types>
    <types>
        <members>*</members>
        <name>ApexTrigger</name>
    </types>    
    <version>23.0</version>
</Package>
-----------------------------------------------------------------------------------------

<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                             

抱歉!评论已关闭.