|
Project Information
Members
Featured
Downloads
|
Ant tasks for Amazon Web ServicesIt's a basic release, i started with it to fit my own needs. But im planning to make it more full featured. If there are any suggestions or you want to cooperate, let me know. I'm using maven to build the project. Supported tasks
Dependencies
UsageThe zip file (aws-ant-tasks-0.1-package.zip) on the left contains working examples. More examples will be added soon.
Setup in ant<?xml version="1.0" encoding="UTF-8"?>
<project name="Example aws-ant-tasks" basedir=".">
<!--
Defining the classpath to the ant-tasks
It includes the ant tasks and the dependencies
-->
<path id="aws.classpath">
<fileset dir="./lib/" includes="*.jar"/>
</path>
<!--
Task definitions:
- aws-s3-create
- aws-s3-put
- aws-s3-delete-bucket
- aws-s3-delete-files
- aws-cloudfront-create
- aws-cloudfront-get
-->
<taskdef resource="com/shoplifes/ant/antlib.xml">
<classpath>
<path refid="aws.classpath"/>
</classpath>
</taskdef>
<!--
AWS Settings
-->
<property name="aws.accessKey" value="YourAccessKeyHere"/>
<property name="aws.secretKey" value="YourSecretKeyHere"/>
<!--
Example 1: create a new bucket
-->
<target name="exampleCreate">
<aws-s3-create
accessKey="${aws.accessKey}"
secretKey="${aws.secretKey}"
bucket="exampleBucket"
properties="true"/>
<echo message="Id: ${ant.aws.s3.create.name}"/>
<echo message="Ref: ${ant.aws.s3.create.creationDate}"/>
<echo message="Status: ${ant.aws.s3.create.owner.name}"/>
<echo message="Domain: ${ant.aws.s3.create.owner.id}"/>
</target>
<!--
Example 2: delete a bucket
-->
<target name="exampleDelete">
<aws-s3-delete-bucket
accessKey="${aws.accessKey}"
secretKey="${aws.secretKey}"
bucket="exampleBucket"/>
</target>
<!--
TODO: more examples :)
-->
</project>
|