Activity Forums Salesforce® Discussions How to retrieve apex classes using Ant migration tool in Salesforce?

  • Achintya

    Member
    August 28, 2019 at 1:05 pm

    1. Download the .zip file of Ant Migration Tool.

    2. Save the .zip file locally, and extract the contents to the directory of your choice.

    After Extracting, a list of following files appear

    *A Readme.html file that explains how to use the tools
    *A Jar file containing the ant task: ant-salesforce.jar
    *A sample folder containing:A codepkgclasses folder that contains SampleDeployClass.cls and   SampleFailingTestClass.cls
    *A codepkgtriggers folder that contains SampleAccountTrigger.trigger
    *A mypkgobjects folder that contains the custom objects used in the examples
    *A removecodepkg folder that contains XML files for removing the examples from your organization
    *A sample build.properties file that you must edit, specifying your credentials, in order to run the sample ant tasks in build.xml
    *A sample build.xml file, that exercises the deploy and retrieve API calls

    Then follow below listed steps

    1. Enter credentials and connection information for source Salesforce organization in build.properties.
    2. Create retrieve targets in build.xml.
    3. Construct a project manifest in package.xml.
    4. Run the Ant Migration Tool to retrieve metadata files from Salesforce.
    5. Enter credentials and connection information for destination Salesforce organization in build.properties.
    6. Run the Ant Migration Tool to deploy metadata files or deletions to Salesforce.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos