-
Notifications
You must be signed in to change notification settings - Fork 245
/
build.xml
72 lines (65 loc) · 2.1 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
<project name="java-ipfs-http-client" default="dist" basedir=".">
<description>
Java IPFS api
</description>
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<path id="dep.runtime">
<fileset dir="./lib">
<include name="**/*.jar" />
</fileset>
</path>
<target name="init">
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init" description="compile the source">
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
<classpath>
<fileset dir="lib">
<include name="**/*.jar" />
</fileset>
</classpath>
</javac>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<mkdir dir="${dist}/lib"/>
<copy todir="${dist}/lib">
<fileset dir="lib"/>
</copy>
<manifestclasspath property="manifest_cp" jarfile="myjar.jar">
<classpath refid="dep.runtime" />
</manifestclasspath>
<jar jarfile="${dist}/ipfs.jar" basedir="${build}">
<manifest>
<attribute name="Class-Path" value="${manifest_cp}"/>
<attribute name="Implementation-Vendor" value="io.ipfs"/>
<attribute name="Implementation-Title" value="api"/>
<attribute name="Implementation-Version" value="1.4.1"/>
</manifest>
</jar>
</target>
<target name="test" depends="compile,dist">
<junit printsummary="yes" fork="true">
<jvmarg value="-Xmx1g"/>
<classpath>
<pathelement location="lib/junit-4.13.2.jar" />
<pathelement location="lib/hamcrest-2.2.jar" />
<pathelement location="dist/ipfs.jar" />
</classpath>
<batchtest haltonfailure="yes">
<fileset dir="src/test/java">
</fileset>
<formatter type="plain"/>
<formatter type="xml"/>
</batchtest>
</junit>
<exec executable="./print_test_errors.sh" failonerror="true">
<arg value="./TEST*"/>
</exec>
</target>
<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>