Skip to content

Instantly share code, notes, and snippets.

@swapnilshrikhande
Created April 21, 2016 13:50
Show Gist options
  • Save swapnilshrikhande/f4ecdc05a101eaf5bca511dc727ce350 to your computer and use it in GitHub Desktop.
Save swapnilshrikhande/f4ecdc05a101eaf5bca511dc727ce350 to your computer and use it in GitHub Desktop.
Deploy salesforce components from one org to another.
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">
<property file="build.properties"/>
<property environment="env"/>
<taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
<classpath>
<pathelement location="../ant-salesforce.jar" />
</classpath>
</taskdef>
<!-- Shows deploying code & running tests for code in directory -->
<target name="deployAllWithTest">
<!-- Upload the contents of the "codepkg" directory, running the tests for just 1 class -->
<sf:deploy username="${sf.username}" password="${sf.password}" serverurl="https://login.salesforce.com" maxPoll="${sf.maxPoll}" deployRoot="src" testLevel="RunAllTestsInOrg" rollbackOnError="true" logType="Debugonly" >
</sf:deploy>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment