

Here there is an example using all of them: In the case this is not provided, it will consider the current directory as the git local copy root directory.

previousDeployment (mandatory): This is the tag or commit of the previous deployment.This directory will be created in case it doesn’t exist. deltaFolder (mandatory): This is the folder where the delta package will be created.This are the arguments you can use with deltaDeployment taskdef: With this task we can create a delta package to be deployed to any of our orgs, to be able to use it you need to add this taskdef:
Sfdc ant migration tool download#
To use them you just need to download this jar file (which includes all the dependencies), and create the taskdefs in your build.xml file. Negative Permission Adder Task: This task detects what what permissions are missing from the last deployment tag (or from a git commit) and adds them back as negatives for deployment purposes only, not to be added back to the repository.Metadata Cleanup Task: This task removes nodes, it can be configured to select what nodes to remove and has a default configuration as we will see later.Delta Deployment Task: This task helps creating a package (files and package.xml) which includes the files that changed between a given git commit and the HEAD of the current branch.The library can be found in my sfdc_ant_tasks github project, and it includes the following three ant tasks:

These scripts were useful but a bit messy to deal with, so why not just build a library that can be use directly from ant? It would make the configuration cleaner and easier to manage that having a bunch of scripts that would depend on what you have installed on your machine. I wrote these scripts in Groovy, and I executed them from ant, after I retrieve metadata from Salesforce or before I’m about to deploy. I have been writing scripts to complement the Salesforce Migration Tool functionality.
