Skip to content

Instantly share code, notes, and snippets.

@stefangoor
Created April 30, 2015 23:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefangoor/73389a37b17b7e8fc214 to your computer and use it in GitHub Desktop.
Save stefangoor/73389a37b17b7e8fc214 to your computer and use it in GitHub Desktop.
The target to
...
<target name="undeploy.content" depends="reset.content">
<property name="temp.dir" value="temp"/>
<xslt in="${temp.dir}${file.separator}package.xml" out="${temp.dir}${file.separator}destructiveChanges.xml" style="xslt${file.separator}destructive.changes.xslt" force="true"/>
<xslt in="${temp.dir}${file.separator}package.xml" out="${temp.dir}${file.separator}empty.package.xml" style="xslt${file.separator}empty.package.xslt" force="true"/>
<zip destfile="${temp.dir}${file.separator}undeploy.zip">
<fileset file="${temp.dir}${file.separator}destructiveChanges.xml"/>
<mappedresources>
<fileset file="${temp.dir}${file.separator}empty.package.xml"/>
<globmapper from="*" to="package.xml"/>
</mappedresources>
</zip>
<sf:deploy username="${sf.username}" password="${sf.password}" serverurl="https://login.salesforce.com" zipFile="${temp.dir}${file.separator}undeploy.zip"/>
</target>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment