forked from Vonage/vonage-java-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
140 lines (115 loc) · 4.64 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?xml version="1.0"?>
<project name="core" default="compile" basedir=".">
<taskdef name="java2html" classname="com.java2html.Java2HTMLTask">
<classpath>
<pathelement location="tools/j2h.jar"/>
</classpath>
</taskdef>
<property name="VERSION" value="1.6-prerelease"/>
<property name="src.dir" value="src"/>
<property name="build.dir" value="build/tmpclasses/sdk"/>
<property name="target.dir" value="build"/>
<property name="javadoc.dir" value="javadoc"/>
<property name="html.dir" value="html"/>
<property name="jar.location" value="nexmo-sdk.jar"/>
<property name="zip.location" value="../nexmo-java-sdk-v${VERSION}.zip"/>
<property name="zip.tmp.dir" value="${target.dir}/zip-tmp"/>
<property name="zip.tmp.contents" value="${zip.tmp.dir}/nexmo-java-sdk-v${VERSION}"/>
<path id="project.classpath">
<pathelement location="${build.dir}"/>
<pathelement location="../../build/tmpclasses/core/"/>
<pathelement location="lib/httpcore-4.1.jar"/>
<pathelement location="lib/httpclient-4.1.1.jar"/>
<pathelement location="lib/commons-logging.jar"/>
<pathelement location="lib/commons-codec-1.5.jar"/>
<pathelement location="lib/servlet-api-3.1.jar"/>
</path>
<target name="init">
<mkdir dir="${build.dir}"/>
</target>
<target name="compile" depends="init">
<echo message="Compile module: sdk" />
<javac srcdir="${src.dir}"
destdir="${build.dir}"
debug="on"
optimize="off"
deprecation="on"
includeAntRuntime="false"
includes="**/*.java"
classpathref="project.classpath">
<compilerarg value="-Xlint:-path" />
</javac>
<jar jarfile="${jar.location}" basedir="${build.dir}" includes="**/*"/>
</target>
<target name="javadoc" depends="compile">
<javadoc sourcepath="${src.dir}"
packagenames="com.nexmo.*"
destdir="${javadoc.dir}"
author="true"
version="true"
use="true"
verbose="true"
classpathref="project.classpath"
/>
</target>
<target name="html" depends="javadoc">
<java2html title="Nexmo Java SDK"
simple="no"
tabsize="4"
marginsize="2"
header="true"
footer="false"
destination="${html.dir}">
<fileset dir="src">
<include name="**/*.java"/>
</fileset>
<javadoc localRef="javadoc" httpRef="http://www.nexmo.com/documentation/gettingstarted/javadoc"/>
</java2html>
</target>
<target name="ship" depends="html">
<delete dir="${zip.tmp.dir}" quiet="true"/>
<mkdir dir="${zip.tmp.dir}"/>
<mkdir dir="${zip.tmp.contents}"/>
<copy todir="${zip.tmp.contents}">
<fileset dir="." includes="**/*.*" excludes="build,build/**/*,**/.svn" />
</copy>
<zip destfile="${zip.location}"
basedir="${zip.tmp.dir}"
excludes=".svn,build,build/**/*,${zip.location}" />
<!--
<zip destfile="${zip.location}"
basedir="."
excludes=".svn,build,build/**/*,${zip.location}" />
-->
<!--
<property name="zip.tmp.dir" value="zip-tmp"/>
<property name="zip.tmp.contents" value="zip-tmp/nexmo-java-sdk-v${VERSION}"/>
-->
</target>
<target name="clean">
<delete dir="${target.dir}" quiet="true"/>
<delete dir="${javadoc.dir}" quiet="true"/>
<delete dir="${html.dir}" quiet="true"/>
<delete file="${jar.location}" quiet="true"/>
</target>
<target name="example" depends="compile">
<java classname="com.nexmo.messaging.sdk.examples.SendTextMessage"
fork="true"
classpathref="project.classpath" />
</target>
<target name="example2" depends="compile">
<java classname="com.nexmo.messaging.sdk.examples.SendWapPush"
fork="true"
classpathref="project.classpath" />
</target>
<target name="example-signed" depends="compile">
<java classname="com.nexmo.messaging.sdk.examples.signed.SendSignedTextMessage"
fork="true"
classpathref="project.classpath" />
</target>
<target name="sns-example" depends="compile">
<java classname="com.nexmo.sns.sdk.examples.SubscribeAndPublishExample"
fork="true"
classpathref="project.classpath" />
</target>
</project>