1. Hi Jitendra, I am getting the below error on execution, any idea why…?

    $ ANT testPackageXML

    Buildfile: c:git_localmy_devAutoGenerate_Package.xml_Antbuild.xml


    [delete] Deleting: c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.Dashboard

    [delete] Deleting: c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.Report

    [delete] Deleting: c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.EmailTemplate

    [delete] Deleting: c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.Document

    [touch] Creating c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.Dashboard

    [touch] Creating c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.Report

    [touch] Creating c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.EmailTemplate

    [touch] Creating c:git_localmy_devAutoGenerate_Package.xml_AnttmpDataloadOrg.Package.xml.Snnipet.Document


    c:git_localmy_devAutoGenerate_Package.xml_AntGeneratePackage_xml.xml:232: The following error occurred while executing this line:

    c:git_localmy_devAutoGenerate_Package.xml_AntGeneratePackage_xml.xml:176: The following error occurred while executing this line:

    c:git_localmy_devAutoGenerate_Package.xml_AntGeneratePackage_xml.xml:91: Problem: failed to create task or type antlib:com.salesforce:listMetadata

    Cause: The name is undefined.

    Action: Check the spelling.

    Action: Check that any custom tasks/types have been declared.

    Action: Check that any / declarations have taken place.

    No types or tasks have been defined in this namespace yet

    This appears to be an antlib declaration.

    Action: Check that the implementing library exists in one of:



    -a directory added on the command line with the -lib argument

    Total time: 0 seconds

  2. Hi Jitendra,

    I find your posts very helpful. I have a question here regarding the automation of deployment,

    I have developed an ant script which will copy latest modified files to a tempfolder and from there it will use a package.xml file which will have each and every component to deploy to destination org. can you guide me how can I accomodate this approach with my ant code? I can also get the file names which are in my tempfolder.

    Process currently following : Ant will look into eclipse local project folder and get latest modified files to a tempfolder.
    – Ant will go back to the source directory with the filenames copied into temp folder and get -meta.xml file if it exsits.
    – here I also want to create a package.xml on the fly using your approach.
    Please guide how can I combine? what would be the best way. Thank you so much for your help.

  3. Hi Jitendra,

    Thank you for the blog. It helped me to automate my migrations. I have another requirement which needs your guidance. After i push to github I am trying to create the ant script so that it will push only changed components from org 1 to org 2. Please give your thoughts on this.

    Thank you

  4. Hi Jitendra,
    Thank you for this amazing blog. I used it and successfully generated a Package.xml. It was really simple.
    Although my question is not related to this blog and slightly on higher level:
    Is it a best practice to keep all your meta data in versioning control ? (In my case, i used this tool to generate package.xml and keep all the data in git).
    I got couple of errors (mostly field missing, permission kind off) when i was trying to deploy this in another org.

    Any suggestions will be helpful. Looking forward for the reply. Thanks.

  5. Hello @JitendraZaa. Do you have any script that will pull in only updated Metadata files from the entire ORG in the last 24 hours and update the package.xml or generate the package.xml

    For e.g.



    gets updated to


  6. Hi Jitendra,

    I have few questions related to package.XML.

    I want to know if we can enable few settings in package.XML before deployment.

    Like : Enabling translation workbench ,

    Enabling multi-currency and more .

    How can i identify which configuration we can configure Using ANT deployment and which not.

    Please help me out with this issue.

  7. Hi Jitendra ,

    I have a question related to package.XML

    I want to know if we can enable few configuration settings using ANT .

    Like if i can enable multi-currency or can we enable Translation workbench using before deployment using package.XMl

    Please help me out with this issue.

    Thank you.

  8. Thanks A lot Jitendra. This blog helped and saved lot of time. I was coming across java.head.runtime error. as one of Email folder has lot of temporary templates. Did some file editing and process one by one folder manually. Still it saved enough time. Thanks a ton.

  9. Hi

    This works fine but the content for the unfiled$public folder for report and dashboard is not fetched.
    I noticed in the report folder text file that the folder id is not present for this . Any idea how to resolve it.

    FileName: unfiled$public
    FullName/Id: unfiled$public/
    Manageable State: unmanaged
    Namespace Prefix:
    Created By (Name/Id): Anupam Tripathi/00590000000oQzwAAE
    Last Modified By (Name/Id): Anupam Tripathi/00590000000oQzwAAE
    FileName: reports/echosign_dev1__EchoSignReports
    FullName/Id: echosign_dev1__EchoSignReports/00l90000001yokzAAA
    Manageable State: installed
    Namespace Prefix: echosign_dev1
    Created By (Name/Id): Anupam Tripathi/00590000000oQzwAAE
    Last Modified By (Name/Id): Anupam Tripathi/00590000000oQzwAAE

    1. when using the generated package to retrieve the components i am getting below warning, as the macro was not able to retrieve the reports inside this folder and replace it with the placeholder.

      [sf:retrieve] package.xml – Entity of type ‘Report’ named ‘ FileName:unfiled$public ‘ cannot be found

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.