-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.xml
69 lines (58 loc) · 2.36 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
<project name="lp-saml-sdk" default="all" basedir="."
xmlns:ivy="antlib:org.apache.ivy.ant">
<description>LastPass SAML SDK - Java</description>
<property environment="env" />
<property name="classes.dir" value="classes"/>
<property name="source.dir" value="src"/>
<property name="output.dir" value="out"/>
<property name="version" value="0.3.0"/>
<property name="output.jar" value="lastpass-saml-sdk-${version}.jar"/>
<target name="resolve" description="--> retrieve dependencies with ivy">
<ivy:retrieve />
</target>
<path id="build.compile.classpath">
<fileset dir="lib" includes="*.jar"/>
</path>
<target name="all">
<antcall target="dist"/>
</target>
<target name="deps" depends="init-ivy,resolve" />
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac
srcdir="${source.dir}"
destdir="${classes.dir}"
debug="true"
includeantruntime="false"
classpathref="build.compile.classpath" >
<compilerarg line="-Xlint:unchecked -Xlint:finally -Xlint:fallthrough" />
</javac>
</target>
<target name="dist" depends="deps,compile">
<mkdir dir="${output.dir}" />
<jar destfile="${output.dir}/${output.jar}">
<fileset dir="${classes.dir}"/>
</jar>
</target>
<!-- bootstrap ivy -->
<property name="ivy.install.version" value="2.2.0" />
<condition property="ivy.home" value="${env.IVY_HOME}">
<isset property="env.IVY_HOME" />
</condition>
<property name="ivy.home" value="${user.home}/.ant" />
<property name="ivy.jar.dir" value="${ivy.home}/lib" />
<property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
<target name="download-ivy" unless="offline">
<mkdir dir="${ivy.jar.dir}"/>
<get src="http://repo2.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}" usetimestamp="true"/>
</target>
<target name="init-ivy" depends="download-ivy">
<path id="ivy.lib.path">
<fileset dir="${ivy.jar.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
</target>
<!-- end ivy setup -->
</project>