-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
36 lines (30 loc) · 1.55 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
<project name="Sample usage of Salesforce Ant tasks" default="test" basedir="." xmlns:sf="antlib:com.salesforce">
<property file="build.properties"/>
<property environment="env"/>
<taskdef uri="antlib:com.salesforce" resource="com/salesforce/antlib.xml" classpath="lib/ant-salesforce.jar"/>
<target name="retrieve">
<mkdir dir="Proj_Metadata"/>
<!-- Retrieve the contents into another directory -->
<sf:retrieve username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" maxPoll="${sf.maxPoll}" retrieveTarget="Proj_Metadata" unpackaged="retrieveSource/package.xml"/>
</target>
<target name="deploy">
<!-- <classpath>
<pathelement path="${classpath}"/>
<pathelement location="lib/ant-salesforce.jar"/>
</classpath>
-->
<sf:deploy username="${sf.usernameDeploy}" password="${sf.passwordDeploy}" serverurl="${sf.serverurlDeploy}" maxPoll="${sf.maxPoll}" deployRoot="Proj_Metadata"/>
</target>
<!-- Retrieve the information of all items of a particular metadata type -->
<target name="listMetadata">
<sf:listMetadata username="${sf.username}" password="${sf.password}" serverurl="${sf.serverurl}" metadataType="Report" resultFilePath="listMetadata/listReports.log" folder="unfiled$public"/>
</target>
<!-- Retrieve the information on all supported metadata type -->
<target name="describeMetadata">
<sf:describeMetadata
username="${sf.username}"
password="${sf.password}"
serverurl="${sf.serverurl}"
resultFilePath="DescribeMetadata/describe.log"/>
</target>
</project>