forked from SalesforceLabs/ChannelPlans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
42 lines (33 loc) · 2.03 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">
<property file="build.properties"/>
<property environment="env"/>
<!-- Setting default value for username, password and session id properties to empty string
so unset values are treated as empty. Without this, ant expressions such as ${sf.username}
will be treated literally.
-->
<condition property="sf.username" value=""> <not> <isset property="sf.username"/> </not> </condition>
<condition property="sf.password" value=""> <not> <isset property="sf.password"/> </not> </condition>
<condition property="sf.sessionId" value=""> <not> <isset property="sf.sessionId"/> </not> </condition>
<taskdef resource="com/salesforce/antlib.xml" uri="antlib:com.salesforce">
<classpath>
<pathelement location="ant-salesforce.jar" />
</classpath>
</taskdef>
<!-- The file unpackaged/package.xml lists what is to be retrieved -->
<target name="get">
<mkdir dir="src"/>
<!-- Retrieve the contents into another directory -->
<sf:retrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="src" unpackaged="package.xml"/>
</target>
<target name="get2">
<mkdir dir="src2"/>
<!-- Retrieve the contents into another directory -->
<sf:retrieve username="${sf.username}" password="${sf.password}" sessionId="${sf.sessionId}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="src2" unpackaged="package2.xml"/>
</target>
<target name="put">
<sf:deploy username="${sf.dest.username}" password="${sf.dest.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployroot="src" />
</target>
<target name="put2">
<sf:deploy username="${sf.dest.username}" password="${sf.dest.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" deployroot="src2" />
</target>
</project>