-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
82 lines (70 loc) · 3.18 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
<?xml version="1.0" encoding="utf-8" ?>
<project name="jakarta-structured-email" default="jar" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="source" location="src"/>
<property name="bin" location="bin/"/>
<property name="dist-dir" location="dist"/>
<property name="lib-source" location="lib"/>
<property name="main-class" value="com.audriga.jakarta.sml.scanner.cli.CliHandler"/>
<path id="project.class.path">
<pathelement location="${bin}"/>
<fileset dir="${lib-source}" includes="*.jar"/>
</path>
<!-- ////////////////////////////////////////////////////////////////// -->
<!-- ///////////////////////// TARGETS ///////////////////////// -->
<!-- ////////////////////////////////////////////////////////////////// -->
<target name="compile" depends="resolve" description="Compile java source to bytecode">
<mkdir dir="${bin}"/>
<javac srcdir="${source}" includes="**" encoding="utf-8"
destdir="${bin}"
source="1.8" target="1.8">
<classpath refid="project.class.path"/>
</javac>
<copy todir="${bin}">
<fileset dir="${source}" excludes="**/*.java"/>
</copy>
</target>
<target name="jar-scanner" depends="resolve,compile" description="Create a jar file">
<mkdir dir="${dist-dir}"/>
<jar jarfile="${dist-dir}/__temp.jar">
<zipgroupfileset dir="${lib-source}">
<include name="**/*.jar" />
</zipgroupfileset>
</jar>
<jar jarfile="${dist-dir}/sml-account-scan.jar" basedir="${bin}">
<zipfileset src="${dist-dir}/__temp.jar"/>
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
</jar>
</target>
<target name="jar-h2lj" depends="resolve,compile" description="Create a jar file">
<mkdir dir="${dist-dir}"/>
<jar jarfile="${dist-dir}/h2lj.jar" basedir="${bin}">
<fileset dir="${bin}" includes="src/com/audriga/jakarta/sml/h2lj/**/*.class" />
</jar>
</target>
<target name="jar" depends="resolve,compile" description="Create a jar file">
<mkdir dir="${dist-dir}"/>
<jar jarfile="${dist-dir}/jakarta-structured-email.jar" basedir="${bin}">
<fileset dir="${bin}" includes="src/com/audriga/jakarta/sml/h2lj/**/*.class" />
<fileset dir="${bin}" includes="src/com/audriga/jakarta/sml/extension/**/*.class" />
</jar>
</target>
<target name="clean" description="Cleans this project">
<delete dir="${bin}" failonerror="false" />
<delete dir="${dist-dir}" failonerror="false" />
<delete dir="${lib-source}" failonerror="false" />
</target>
<target name="resolve" description="--> retrieve dependencies with ivy">
<ivy:retrieve type="jar,bundle" />
</target>
<target name="report">
<mkdir dir="report" />
<ivy:resolve type="${ivy.resolve.types}"/>
<echoproperties/>
<ivy:report todir="report" />
</target>
<target name="clean-all" depends="clean" description="Purge ivy cache">
<ivy:cleancache/>
</target>
</project>