Upload
cloudanalogy
View
473
Download
4
Embed Size (px)
Citation preview
Ant Migration tool is used to Create and Fetch Metadata to and from an organisation. It's a command-line utility by which one can upload and download Metadata components.
Ant Migration
www.cloudanalogy.com
1. Its very useful for creating repetitive deployment or may be a large number of components just by executing a command in an command line interface.
2. Useful for uploading test environment with a lot of configuration settings.
3. Manually creating Fields, Objects may take a huge amount of time when you create them by clicking with the salesforce interface. These fields can be created with one command in the Command line interface and using Package.xml file in which you specify the information about all the fields.
Ant Migration
www.cloudanalogy.com
1. The Name of the components we can Deploy or retrieve are as follows:a. Custom Fields.b. Objects.c. Workflow rules.d. Apex Triggers.e. Apex Class.f. Visualforce Pages. Etc.
The Whole list is mentioned in this link:https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_types_list.htm
Ant Migration
www.cloudanalogy.com
1. Download Force.com migration tool from your salesforce organisation.a. Go to Setup.b. Type “Tool” and Click on Force.com Migration tool & Toolkits.c. Go to the Following Link for downloading Ant:
https://gs0.salesforce.com/dwnld/SfdcAnt/salesforce_ant_36.0.zip2. Add the bin directory to your path.3. Set the ANT_HOME environment variable to the directory where you
installed Ant.
Ant Migration
www.cloudanalogy.com
1. Set the JAVA_HOME environment variable to the directory where the JDK is installed.
2. Run command in Command line Interface: “ant -version” to check the version and confirm the installation.
Ant Migration
www.cloudanalogy.com
Ant Migration
www.cloudanalogy.com
1. Create three Files:a. Package.xml - Which consists the specifications for the components.
Usage
Ant Migration
www.cloudanalogy.com
a. Build.properties - Which consists the Credentials of the salesforce Organisation to & from which you want to Upload/Download.
Ant Migration
www.cloudanalogy.com
Note: You have to mention Security token at the end of the password of the Org in which you want to Upload the metadata. Build.xml - This file is used to set the attributes which will be used in the Command line interface such as “Project Name”,”Property File”, ”retrieveTarget folder( where Downloaded metadata info will be saved)” ,”unpackaged(Package.xml file)”. <project name="ANT Migration" default="test" basedir="." xmlns:sf="antlib:com.salesforce">
Ant Migration
www.cloudanalogy.com
Ant Migration
www.cloudanalogy.com
Ant Migration
www.cloudanalogy.com
1. Go to the path where you stored these files and then Run commands as follows:a. Upload(Which you mentioned in your build.xml file as
target) - For uploading components you mentioned in the Package.xml file.
b. Retrieve- For downloading the Components information you mentioned in the package.xml file and then that information will be created in a folder(Self Generated folder Named as Retrieve).
Ant Migration
www.cloudanalogy.com
www.cloudanalogy.com
MANY THANKS !