{"id":4158,"date":"2015-01-01T02:54:21","date_gmt":"2015-01-01T02:54:21","guid":{"rendered":"http:\/\/www.jitendrazaa.com\/blog\/?p=4158"},"modified":"2015-01-01T02:54:21","modified_gmt":"2015-01-01T02:54:21","slug":"auto-generate-package-xml-using-ant-complete-source-code-and-video","status":"publish","type":"post","link":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/auto-generate-package-xml-using-ant-complete-source-code-and-video\/","title":{"rendered":"Auto generate Package.xml using Ant &#8211; complete source code and Video"},"content":{"rendered":"<p style=\"text-align: justify;\">If we\u00a0want to use Ant\u00a0Migration tool to fetch Salesforce Organization metadata info or to deploy some changes to Salesforce, we need to create &#8220;<strong>package.xml<\/strong>&#8221; manually or take help of eclipse. wildcard character (*) doesnt work with some components like report, emailtemplate, dashboard and document. Package.xml must needs to have folder name and files inside folder name. \u00a0After getting package.xml from eclipse, what if some folder is added into Organization ? We need to update &#8220;package.xml&#8221; again with help of eclipse or do it manually. Therefore I wanted to automate generation of package.xml completely and came up with this article and below workaround.<\/p>\n<p style=\"text-align: justify;\">I would be using Ant\u00a0to generate &#8220;package.xml&#8221; with below steps<\/p>\n<ol>\n<li style=\"text-align: justify;\">get Ant\u00a0Migration tool jar from <a title=\"Salesforce ANT Migration tool\" href=\"http:\/\/www.salesforce.com\/us\/developer\/docs\/daas\/Content\/forcemigrationtool_install.htm\">here<\/a><\/li>\n<li style=\"text-align: justify;\">get AntContrib from <a title=\"ant-contrib jar file from Maven\" href=\"http:\/\/mvnrepository.com\/artifact\/ant-contrib\/ant-contrib\/1.0b3\">here<\/a><\/li>\n<li style=\"text-align: justify;\">create basic template of &#8220;package.xml&#8221; with placeholders in place of Report, Dashboard, EmailTemplate and Document, <a title=\"Github of JitendraZaa\" href=\"https:\/\/github.com\/JitendraZaa\/AutoGenerate_Package.xml_Ant\/blob\/master\/config\/template-Package-Folders.xml\">sample here<\/a><\/li>\n<li style=\"text-align: justify;\">create Ant\u00a0Macro to replace placeholders<\/li>\n<li style=\"text-align: justify;\">create second Ant\u00a0Macro to fetch all folders available using Metadata API (using sf:listMetadata)<\/li>\n<li style=\"text-align: justify;\">create third Ant\u00a0Macro to fetch files inside each folder using Metadata API (using sf:listMetadata)<\/li>\n<\/ol>\n<p><!--more--><\/p>\n<p><iframe loading=\"lazy\" src=\"\/\/www.youtube.com\/embed\/CPMLkX4ewuk\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n<p>We need to perform heavy file manipulation operations and iterate through each line, which is not possible by standard Ant\u00a0\u00a0feature and therefore we need AntContrib library.<\/p>\n<p><strong>file &#8211; GeneratePackage_xml.properties<\/strong><br \/>\nThis file will have all configuration like username, Password<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n#   By      :   Jitendra Zaa\r\n#   Date    :   12\/31\/2014\r\n#   Address :   https:\/\/jitendrazaa.com\r\nsfSandbox.serverurl = https:\/\/test.salesforce.com\r\nsfPRO.serverurl = https:\/\/login.salesforce.com\r\n \r\nsf.username = YOURUSERNAME\r\nsf.password = YOURPASSWORD \r\nsf.xmlPath = tmp\r\nsf.Name = TrainingOrg\r\n\r\npackage.xml.template = config\/template-Package-Folders.xml\r\n<\/pre>\n<p style=\"text-align: justify;\"><strong>file &#8211; GeneratePackage_xml.xml<\/strong><br \/>\nthis file will have complete logic with definitions of custom Macro to retrieve folder names and files inside those folder. It is not necessary to create separate file, we can use build.xml itself however good to separate logic from main file.<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!--\r\n    Author  :   Jitendra Zaa\r\n    Date    :   12\/31\/2014\r\n    Address :   https:\/\/jitendrazaa.com\r\n--&gt;\r\n&lt;project name=&quot;Generate Package.xml&quot; default=&quot;testPackageXML&quot; basedir=&quot;.&quot; xmlns:sf=&quot;antlib:com.salesforce&quot;&gt;\r\n    \r\n    &lt;!-- \r\n        Import AntContrib \r\n        Download it from - http:\/\/mvnrepository.com\/artifact\/ant-contrib\/ant-contrib\/1.0b3 \r\n    --&gt; \r\n      &lt;taskdef resource=&quot;net\/sf\/antcontrib\/antlib.xml&quot;&gt;\r\n        &lt;classpath&gt;\r\n          &lt;pathelement location=&quot;${basedir}\/lib\/ant-contrib-1.0b3.jar&quot;\/&gt;\r\n        &lt;\/classpath&gt;\r\n      &lt;\/taskdef&gt;\r\n       \r\n    &lt;property file=&quot;GeneratePackage_xml.properties&quot;\/&gt;\r\n    &lt;property environment=&quot;env&quot;\/&gt; \r\n  \r\n    &lt;macrodef name=&quot;Package_fetchFolderContents&quot;&gt; \r\n        &lt;attribute name=&quot;folderName&quot;\/&gt;\r\n        &lt;attribute name=&quot;componentType&quot;\/&gt;\r\n        &lt;attribute name=&quot;orgName&quot;\/&gt; \r\n        &lt;attribute name=&quot;sfUserName&quot;\/&gt;\r\n        &lt;attribute name=&quot;sfPassword&quot;\/&gt;\r\n        &lt;attribute name=&quot;sfServerURL&quot;\/&gt;        \r\n        &lt;sequential&gt;             \r\n            &lt;sf:listMetadata\r\n                    username=&quot;@{sfUserName}&quot;\r\n                    password=&quot;@{sfPassword}&quot; \r\n                    serverurl=&quot;@{sfServerURL}&quot;\r\n                    metadataType=&quot;@{componentType}&quot; \r\n                    folder=&quot;@{folderName}&quot;\r\n                    resultFilePath=&quot;tmp\/@{orgName}-@{componentType}-@{folderName}.log&quot;\/&gt; \r\n            &lt;if&gt;\r\n                &lt;!-- Execute only if file created --&gt;\r\n                &lt;available file=&quot;tmp\/@{orgName}-@{componentType}-@{folderName}.log&quot;\/&gt;\r\n                &lt;then&gt;\r\n                    &lt;loadfile srcfile=&quot;tmp\/@{orgName}-@{componentType}-@{folderName}.log&quot; property=&quot;@{orgName}.@{componentType}.@{folderName}&quot; &gt;\r\n                        &lt;filterchain&gt; \r\n                            &lt;ignoreblank\/&gt;\r\n                            &lt;linecontains negate=&quot;false&quot;&gt;\r\n                                &lt;contains value=&quot;FileName:&quot;\/&gt;\r\n                            &lt;\/linecontains&gt;                             \r\n                            &lt;prefixlines prefix=&quot;&amp;lt;members&amp;gt;&quot;\/&gt;\r\n                            &lt;suffixlines suffix=&quot;&amp;lt;\/members&amp;gt;&quot;\/&gt;\r\n                            &lt;tokenfilter&gt; \r\n                                &lt;replacestring from=&quot;FileName: reports\/&quot; to=&quot;&quot;\/&gt;\r\n                                &lt;replacestring from=&quot;FileName: documents\/&quot; to=&quot;&quot;\/&gt;\r\n                                &lt;replacestring from=&quot;FileName: email\/&quot; to=&quot;&quot;\/&gt; \r\n                                &lt;replacestring from=&quot;FileName: dashboards\/&quot; to=&quot;&quot;\/&gt;  \r\n                                &lt;replacestring from=&quot;.report&quot; to=&quot;&quot;\/&gt; \r\n                                &lt;replacestring from=&quot;.email&quot; to=&quot;&quot;\/&gt; \r\n                                &lt;replacestring from=&quot;.dashboard&quot; to=&quot;&quot;\/&gt; \r\n                            &lt;\/tokenfilter&gt;\r\n                        &lt;\/filterchain&gt; \r\n                    &lt;\/loadfile&gt;                     \r\n                    &lt;concat destfile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.@{componentType}&quot; append=&quot;true&quot;&gt; \r\n                        ${@{orgName}.@{componentType}.@{folderName}}\r\n                     &lt;\/concat&gt;\r\n                    &lt;!-- &lt;echo&gt; Extracted Report Names - ${@{orgName}.@{componentType}.@{folderName}} &lt;\/echo&gt; --&gt;\r\n               &lt;\/then&gt;\r\n           &lt;\/if&gt;\r\n        &lt;\/sequential&gt;    \r\n    &lt;\/macrodef&gt;\t\r\n    &lt;macrodef name=&quot;Package_computeFolderName&quot;&gt;\r\n        &lt;attribute name=&quot;sfUserName&quot;\/&gt;\r\n        &lt;attribute name=&quot;sfPassword&quot;\/&gt;\r\n        &lt;attribute name=&quot;sfServerURL&quot;\/&gt;   \r\n        &lt;attribute name=&quot;metadataType&quot;\/&gt; \r\n        &lt;attribute name=&quot;tmpFolderPath&quot;\/&gt;   \r\n        &lt;attribute name=&quot;componentType&quot;\/&gt;  \r\n        &lt;attribute name=&quot;orgName&quot;\/&gt;           \r\n        &lt;sequential&gt;                \r\n            &lt;sf:listMetadata\r\n                    username=&quot;@{sfUserName}&quot;\r\n                    password=&quot;@{sfPassword}&quot; \r\n                    serverurl=&quot;@{sfServerURL}&quot;\r\n                    metadataType=&quot;@{metadataType}&quot; \r\n                    resultFilePath=&quot;@{tmpFolderPath}&quot;\/&gt;\r\n            &lt;echo&gt; Output file for sf:listMetadata - @{tmpFolderPath} &lt;\/echo&gt;          \r\n            &lt;loadfile srcfile=&quot;@{tmpFolderPath}&quot; property=&quot;@{orgName}.@{metadataType}.onlyFolderName&quot; &gt;\r\n                &lt;filterchain&gt; \r\n                    &lt;ignoreblank\/&gt;\r\n                    &lt;linecontains negate=&quot;false&quot;&gt;\r\n                        &lt;contains value=&quot;FileName&quot;\/&gt;\r\n                    &lt;\/linecontains&gt;  \r\n                    &lt;tokenfilter&gt;\r\n                        &lt;replacestring from=&quot;FileName: reports\/&quot; to=&quot;&quot;\/&gt;\r\n                        &lt;replacestring from=&quot;FileName: documents\/&quot; to=&quot;&quot;\/&gt;\r\n                        &lt;replacestring from=&quot;FileName: email\/&quot; to=&quot;&quot;\/&gt; \r\n                        &lt;replacestring from=&quot;FileName: dashboards\/&quot; to=&quot;&quot;\/&gt;  \r\n                        &lt;replacestring from=&quot; &quot; to=&quot;&quot;\/&gt;\r\n                    &lt;\/tokenfilter&gt;\r\n                &lt;\/filterchain&gt; \r\n            &lt;\/loadfile&gt;                      \r\n            &lt;for param=&quot;line&quot; list=&quot;${@{orgName}.@{metadataType}.onlyFolderName}&quot; delimiter=&quot;${line.separator}&quot;&gt;\r\n              &lt;sequential&gt; \r\n                &lt;echo&gt; Folder - @{line} &lt;\/echo&gt;  \r\n                &lt;concat destfile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.@{componentType}&quot; append=&quot;true&quot;&gt;\r\n                    &amp;lt;members&amp;gt; @{line} &amp;lt;\/members&amp;gt; \r\n                &lt;\/concat&gt;                \r\n                &lt;Package_fetchFolderContents \r\n                    folderName=&quot;@{line}&quot; \r\n                    componentType=&quot;@{componentType}&quot; \r\n                    orgName=&quot;@{orgName}&quot; \r\n                    sfusername=&quot;@{sfUserName}&quot;\r\n                    sfPassword=&quot;@{sfPassword}&quot; \r\n                    sfServerURL=&quot;@{sfServerURL}&quot; \/&gt;                    \r\n              &lt;\/sequential&gt;\r\n            &lt;\/for&gt; \r\n        &lt;\/sequential&gt;\r\n     &lt;\/macrodef&gt;     \r\n    &lt;macrodef name=&quot;GeneratePackage_xml&quot;&gt;\r\n        &lt;attribute name=&quot;sfUserName&quot;\/&gt;\r\n        &lt;attribute name=&quot;sfPassword&quot;\/&gt;\r\n        &lt;attribute name=&quot;sfServerURL&quot;\/&gt; \r\n        &lt;!-- This attribute decides where to copy Package.xml --&gt;\r\n        &lt;attribute name=&quot;packageXMLPath&quot;\/&gt;  \r\n        &lt;attribute name=&quot;orgName&quot;\/&gt;         \r\n        &lt;sequential&gt;\r\n             &lt;!-- Delete All files first else it will append to existing old file --&gt;\r\n            &lt;delete file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Dashboard&quot;\/&gt;\r\n            &lt;delete file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Report&quot;\/&gt;\r\n            &lt;delete file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.EmailTemplate&quot;\/&gt;\r\n            &lt;delete file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Document&quot;\/&gt;\r\n            \r\n            &lt;!-- Create Fresh Files --&gt;\r\n            &lt;touch file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Dashboard&quot;\/&gt;\r\n            &lt;touch file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Report&quot;\/&gt;\r\n            &lt;touch file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.EmailTemplate&quot;\/&gt;\r\n            &lt;touch file=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Document&quot;\/&gt;\r\n            \r\n            &lt;!-- Empty Content in each file --&gt;\r\n            &lt;property name=&quot;blankVal&quot; value=&quot;&quot;\/&gt; \r\n            &lt;concat destfile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Dashboard&quot; append=&quot;true&quot;&gt; ${blankVal} &lt;\/concat&gt;\r\n            &lt;concat destfile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Report&quot; append=&quot;true&quot;&gt; ${blankVal} &lt;\/concat&gt;\r\n            &lt;concat destfile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.EmailTemplate&quot; append=&quot;true&quot;&gt; ${blankVal} &lt;\/concat&gt;\r\n            &lt;concat destfile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Document&quot; append=&quot;true&quot;&gt; ${blankVal} &lt;\/concat&gt;            \r\n             \r\n            &lt;!-- \r\n                Imp Step :\r\n                1. We must assign Password to property and then pass to other Macro else it will ignore\r\n                   all occurrences of '$' in password\r\n                2. Property Name must be unique so safer to add Org Name also\r\n            --&gt;\r\n            &lt;property name=&quot;sfPassword.prop.@{orgName}&quot; value=&quot;@{sfPassword}&quot;\/&gt;        \r\n            &lt;Package_computeFolderName \r\n                sfUserName=&quot;@{sfUserName}&quot;\r\n                sfPassword=&quot;$${sfPassword.prop.@{orgName}}&quot; \r\n                sfServerURL=&quot;@{sfServerURL}&quot;\r\n                metadataType=&quot;DashboardFolder&quot;\r\n                componentType = &quot;Dashboard&quot;                \r\n                tmpFolderPath = &quot;tmp\/@{orgName}.DashboardFolders.log&quot; \r\n                orgName=&quot;@{orgName}&quot; \r\n            \/&gt;    \r\n             \r\n            &lt;Package_computeFolderName \r\n                sfUserName=&quot;@{sfUserName}&quot;\r\n                sfPassword=&quot;$${sfPassword.prop.@{orgName}}&quot; \r\n                sfServerURL=&quot;@{sfServerURL}&quot;\r\n                metadataType=&quot;ReportFolder&quot;  \r\n                componentType=&quot;Report&quot;\r\n                tmpFolderPath = &quot;tmp\/@{orgName}.ReportFolders.log&quot; \r\n                orgName=&quot;@{orgName}&quot; \r\n            \/&gt;  \r\n            \r\n            &lt;Package_computeFolderName \r\n                sfUserName=&quot;@{sfUserName}&quot;\r\n                sfPassword=&quot;$${sfPassword.prop.@{orgName}}&quot; \r\n                sfServerURL=&quot;@{sfServerURL}&quot;\r\n                metadataType=&quot;EmailFolder&quot; \r\n                componentType=&quot;EmailTemplate&quot;\r\n                tmpFolderPath = &quot;tmp\/@{orgName}.EmailFolders.log&quot; \r\n                orgName=&quot;@{orgName}&quot; \r\n            \/&gt;\r\n               \r\n            &lt;Package_computeFolderName \r\n                sfUserName=&quot;@{sfUserName}&quot;\r\n                sfPassword=&quot;$${sfPassword.prop.@{orgName}}&quot; \r\n                sfServerURL=&quot;@{sfServerURL}&quot;\r\n                metadataType=&quot;DocumentFolder&quot; \r\n                componentType = &quot;Document&quot; \r\n                tmpFolderPath = &quot;tmp\/@{orgName}.DocumentFolders.log&quot; \r\n                orgName=&quot;@{orgName}&quot; \r\n            \/&gt; \r\n            \r\n            &lt;!-- Load Generated File content which has Snippet of Package.xml in Property --&gt;\r\n            &lt;loadfile property=&quot;@{orgName}.DashboardFolder.log.edit&quot; srcFile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Dashboard&quot; failonerror=&quot;false&quot;\/&gt;\r\n            &lt;loadfile property=&quot;@{orgName}.ReportFolder.log.edit&quot; srcFile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Report&quot; failonerror=&quot;false&quot;\/&gt; \r\n            &lt;loadfile property=&quot;@{orgName}.EmailFolder.log.edit&quot; srcFile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.EmailTemplate&quot; failonerror=&quot;false&quot;\/&gt;\r\n            &lt;loadfile property=&quot;@{orgName}.DocumentFolder.log.edit&quot; srcFile=&quot;tmp\/@{orgName}.Package.xml.Snnipet.Document&quot; failonerror=&quot;false&quot;\/&gt;\r\n            \r\n            &lt;copy file=&quot;${package.xml.template}&quot; tofile=&quot;@{packageXMLPath}&quot; overwrite=&quot;true&quot; failonerror=&quot;true&quot;\/&gt; \r\n            &lt;replace file=&quot;@{packageXMLPath}&quot;&gt;\r\n                &lt;replacefilter token=&quot;_replaceReportMembersTag_&quot; value=&quot;${@{orgName}.ReportFolder.log.edit}&quot;\/&gt; \r\n                &lt;replacefilter token=&quot;_replaceEmailTemplateMembersTag_&quot; value=&quot;${@{orgName}.EmailFolder.log.edit}&quot;\/&gt; \r\n                &lt;replacefilter token=&quot;_replaceDashboardMembersTag_&quot; value=&quot;${@{orgName}.DashboardFolder.log.edit}&quot;\/&gt; \r\n                &lt;replacefilter token=&quot;_replaceDocumentMembersTag_&quot; value=&quot;${@{orgName}.DocumentFolder.log.edit}&quot;\/&gt; \r\n            &lt;\/replace&gt;            \r\n        &lt;\/sequential&gt; \r\n    &lt;\/macrodef&gt;\r\n    \r\n    &lt;target name=&quot;testPackageXML&quot;&gt; \r\n        &lt;GeneratePackage_xml\r\n            sfUserName = &quot;${sf.username}&quot; \r\n            sfPassword = &quot;$${sf.password}&quot;\r\n            sfServerURL = &quot;${sfPRO.serverurl}&quot;\r\n            packageXMLPath = &quot;${basedir}\/${sf.xmlPath}\/Package.xml&quot; \r\n            orgName=&quot;${sf.Name}&quot;  \/&gt;            \r\n    &lt;\/target&gt;\r\n&lt;\/project&gt;\r\n<\/pre>\n<p><strong>file &#8211; build.xml<\/strong><br \/>\nthis is main file needed by Ant which will be used to bootstrap<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;!--\r\n    Author  :   Jitendra Zaa\r\n    Date    :   12\/31\/2014\r\n    Address :   https:\/\/jitendrazaa.com\r\n--&gt;\r\n&lt;project name=&quot;Generate Package.xml subfile&quot; default=&quot;testPackageXML&quot; basedir=&quot;.&quot; xmlns:sf=&quot;antlib:com.salesforce&quot;&gt;\r\n    &lt;import file=&quot;GeneratePackage_xml.xml&quot; as=&quot;complete&quot;\/&gt;\r\n&lt;\/project&gt;\r\n<\/pre>\n<p><strong>folder &#8211; config<\/strong><br \/>\ncopy &#8220;template-Package-Folders.xml&#8221; in this folder. we can have multiple formats of package.xml as per need.<\/p>\n<p><strong>folder &#8211; lib<\/strong><br \/>\nstore downloaded &#8220;ant-contrib-1.0b3.jar&#8221; in this folder<\/p>\n<p><strong>How to run this<\/strong><\/p>\n<ol>\n<li>Open Command prompt<\/li>\n<li>Navigate to folder where &#8220;build.xml&#8221; is present<\/li>\n<li>execute command : &#8220;Ant&#8221; or &#8220;Ant testPackageXML&#8221;<\/li>\n<\/ol>\n<p style=\"text-align: justify;\">This is just demo that how we can perform file manipulations in Ant and how to fetch folder and file names using Metadata API. Every project has specific needs so you may need to modify this code. Complete source code and jar file is available in <a title=\"Jitendra Zaa Github Account\" href=\"https:\/\/github.com\/JitendraZaa\/AutoGenerate_Package.xml_Ant\">my github account<\/a>,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If we\u00a0want to use Ant\u00a0Migration tool to fetch Salesforce Organization metadata info or to deploy some changes to Salesforce, we need to create &#8220;package.xml&#8221; manually or take help of eclipse. wildcard character (*) doesnt work with some components like report, emailtemplate, dashboard and document. Package.xml must needs to have folder name and files inside folder [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"jz_research_post":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[9],"tags":[261,262,285,331,227],"class_list":["post-4158","post","type-post","status-publish","format-standard","hentry","category-salesforce","tag-ant","tag-ant-migration-tool","tag-metadata-api","tag-salesforce","tag-xml"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":2892,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/salesforce-migration-tool-ant\/","url_meta":{"origin":4158,"position":0},"title":"Complete Salesforce Deployment Guide using Ant Migration Tool","author":"Jitendra","date":"June 5, 2012","format":false,"excerpt":"Step by Step tutorial of Salesforce Migration using ANT tool with Proxy settings and retrieving content from Salesforce Organization. Also fix some common errors like java.lang.OutOfMemoryError or unable to find tools.jar","rel":"","context":"In &quot;Configuration&quot;","block_context":{"text":"Configuration","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/configuration\/"},"img":{"alt_text":"Salesforce Get ANT version ","src":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/06\/Salesforce-Get-ANT-version-Original.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/06\/Salesforce-Get-ANT-version-Original.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/jitendrazaa.com\/blog\/wp-content\/uploads\/2012\/06\/Salesforce-Get-ANT-version-Original.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":6209,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/how-to-retrieve-and-deploy-custom-metadata-types-using-ant\/","url_meta":{"origin":4158,"position":1},"title":"How to Retrieve and Deploy Custom Metadata Types using ANT","author":"Jitendra","date":"August 27, 2017","format":false,"excerpt":"Using Salesforce ANT Migration toolkit to retrieve and deploy custom metadata types with record. Sample Package.xml and ANT script included.","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Sample of Package.xml to deploy Custom Metadata Types","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/08\/Sample-of-Package.xml-to-deploy-Custom-Metadata-Types.png?fit=1051%2C330&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/08\/Sample-of-Package.xml-to-deploy-Custom-Metadata-Types.png?fit=1051%2C330&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/08\/Sample-of-Package.xml-to-deploy-Custom-Metadata-Types.png?fit=1051%2C330&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/08\/Sample-of-Package.xml-to-deploy-Custom-Metadata-Types.png?fit=1051%2C330&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/08\/Sample-of-Package.xml-to-deploy-Custom-Metadata-Types.png?fit=1051%2C330&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":6353,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/use-metadata-api-with-salesforce-dx\/","url_meta":{"origin":4158,"position":2},"title":"Use Metadata API with Salesforce DX","author":"Jitendra","date":"November 12, 2017","format":false,"excerpt":"How to use SalesforceDX to deploy metadata in Sandboxes or Non-Scratch Salesforce instances","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Use Metadata API or Package.xml with Salesforce DX","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/11\/Use-Metadata-API-or-Package.xml-with-SFDX.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/11\/Use-Metadata-API-or-Package.xml-with-SFDX.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/11\/Use-Metadata-API-or-Package.xml-with-SFDX.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/11\/Use-Metadata-API-or-Package.xml-with-SFDX.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2017\/11\/Use-Metadata-API-or-Package.xml-with-SFDX.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3902,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/automated-daily-backup-using-ant-migration-tool-and-git\/","url_meta":{"origin":4158,"position":3},"title":"Automated Daily Backup of Salesforce Using ANT Migration Tool and GIT","author":"Jitendra","date":"July 5, 2014","format":false,"excerpt":"In few\u00a0previous articles, I have talked about how to use \"ANT Migration tool in Salesforce\" and \"How to Use EGit plugin in Eclipse to work with Git\". So to make this article short, I assume that you are already familiar with ANT Migration tool provided by Salesforce and Git. During\u2026","rel":"","context":"In &quot;Configuration&quot;","block_context":{"text":"Configuration","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/configuration\/"},"img":{"alt_text":"Salesforce Automated Script for Data Backup Using CommandLine","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/07\/Salesforce-Automated-Script-for-Data-Backup-Using-CommandLine.png?resize=350%2C200&ssl=1","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/07\/Salesforce-Automated-Script-for-Data-Backup-Using-CommandLine.png?resize=350%2C200&ssl=1 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2014\/07\/Salesforce-Automated-Script-for-Data-Backup-Using-CommandLine.png?resize=525%2C300&ssl=1 1.5x"},"classes":[]},{"id":5478,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/delete-components-using-ant-migration-tool-video\/","url_meta":{"origin":4158,"position":4},"title":"Delete Components using Ant Migration tool &#8211; Video","author":"Jitendra","date":"April 27, 2016","format":false,"excerpt":"This video tutorial shows that how we can delete components like Apex class, trigger from Salesforce using ANT migration tool.","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/img.youtube.com\/vi\/3kMGy6OeJAc\/0.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":6499,"url":"https:\/\/www.jitendrazaa.com\/blog\/salesforce\/using-salesforcedx-sfdx-with-non-scratch-orgs\/","url_meta":{"origin":4158,"position":5},"title":"Using SalesforceDX (SFDX) with non Scratch Orgs","author":"Jitendra","date":"June 24, 2018","format":false,"excerpt":"How to use SalesforceDX (SFDX) with Sandbox, Developer and Production Orgs","rel":"","context":"In &quot;Salesforce&quot;","block_context":{"text":"Salesforce","link":"https:\/\/www.jitendrazaa.com\/blog\/category\/salesforce\/"},"img":{"alt_text":"Use SFDX with non scratch Orgs","src":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-24-at-9.08.53-PM.png?fit=1200%2C645&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-24-at-9.08.53-PM.png?fit=1200%2C645&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-24-at-9.08.53-PM.png?fit=1200%2C645&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-24-at-9.08.53-PM.png?fit=1200%2C645&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/www.jitendrazaa.com\/blog\/wp-content\/uploads\/2018\/06\/Screen-Shot-2018-06-24-at-9.08.53-PM.png?fit=1200%2C645&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4158","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/comments?post=4158"}],"version-history":[{"count":3,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4158\/revisions"}],"predecessor-version":[{"id":4161,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/posts\/4158\/revisions\/4161"}],"wp:attachment":[{"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/media?parent=4158"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/categories?post=4158"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.jitendrazaa.com\/blog\/wp-json\/wp\/v2\/tags?post=4158"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}