-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.xml
75 lines (66 loc) · 2.6 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="azureant">
<property environment="env"/>
<property name="env.JAVA_TOOL_OPTIONS" value="-Dfile.encoding=UTF8"/>
<property name="build.src" value="${basedir}/src" />
<property name="java.build.lib" value="${basedir}/jars/" />
<property name="build.out" value="${basedir}/build" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="build.classes" value="${build.out}/classes" />
<property name="final.name" value="azureant" />
<property name="azure.key" value="" />
<property name="azure.account" value="azureant" />
<property name="azure.container" value="testfiles" />
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="libs/ant-contrib-1.0b1.jar"/>
</classpath>
</taskdef>
<path id="java.lookasta.classpath">
<pathelement location="${build.classes}"/>
<fileset dir="${java.build.lib}">
<include name="*.jar" />
</fileset>
<fileset dir="${dist.dir}">
<include name="*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="${build.classes}" />
<mkdir dir="${dist.dir}" />
</target>
<target name="build" depends="init" >
<javac destdir="${build.classes}" debug="true" debuglevel="lines,vars,source" encoding="UTF-8">
<src path="${build.src}" />
<classpath>
<path refid="java.lookasta.classpath" />
</classpath>
</javac>
</target>
<target name="jar" depends="build">
<mkdir dir="${build.classes}/META-INF" />
<jar jarfile="${dist.dir}/${final.name}.jar" basedir="${build.classes}" manifest="conf/MANIFEST.MF" />
</target>
<target name="test" description="Upload test file to azure" depends="jar">
<taskdef name="azurefileup" classname="org.citybot.ant.AzureBlobFileUpload" >
<classpath>
<path refid="java.lookasta.classpath" />
</classpath>
</taskdef>
<azurefileup container="${azure.container}" list="true" create="true" account="${azure.account}" key="${azure.key}">
<fileset dir="testfiles/">
<include name="*.txt"/>
</fileset>
</azurefileup>
<taskdef name="azurefiledown" classname="org.citybot.ant.AzureBlobFileDownload" >
<classpath>
<path refid="java.lookasta.classpath" />
</classpath>
</taskdef>
<azurefiledown file="azureanttest_download.txt" blob="azureanttest.txt" container="${azure.container}" account="${azure.account}" key="${azure.key}"/>
</target>
<target name="clean">
<delete dir="${build.out}" />
<delete dir="${dist.dir}" />
</target>
</project>