-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathexample_use_build.xml
41 lines (35 loc) · 1.84 KB
/
example_use_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
<?xml version="1.0" encoding="utf-8"?>
<project name="MyTask" basedir="." default="use">
<property name="test.aws.access_key" value="your-value-here" />
<property name="test.aws.secret_key" value="your-value-here" />
<property name="test.aws.bucket" value="your-value-here" />
<!-- Task for setting up the aws-ant-tasks -->
<target name="awstasks.setup">
<path id="tasks.path">
<fileset dir="target/aws-ant-tasks-0.5-SNAPSHOT-bin" includes="*.jar"/>
</path>
<taskdef name="s3put" classpath="aws-ant-tasks-0.3-SNAPSHOT-bin" classname="it.corley.ant.S3PutTask"
classpathref="tasks.path"/>
<typedef name="contenttype.mapping" classname="it.corley.ant.ContentTypeMapping" classpathref="tasks.path"/>
<typedef name="cachecontrol.mapping" classname="it.corley.ant.CacheControlMapping" classpathref="tasks.path"/>
<typedef name="contentencoding.mapping" classname="it.corley.ant.ContentEncodingMapping" classpathref="tasks.path"/>
</target>
<!--Actual use -->
<target name="use" description="Use the Task" depends="awstasks.setup">
<property file="test.properties"/>
<s3put
endpoint="s3-eu-west-1.amazonaws.com"
key="${test.aws.access_key}"
secret="${test.aws.secret_key}"
bucket="${test.aws.bucket}"
dest="aws-task-tests"
publicread="true"
cacheControl="3600"
contentType="application/x-readme">
<fileset dir="." includes="README.md"/>
<contenttypemapping extension="md" contenttype="text/plain"/>
<cachecontrolmapping extension="md" cacheControl="max-age=7200"/>
<contentencodingmapping extension="md" encoding="UTF-8" />
</s3put>
</target>
</project>