-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbuildLGPL.xml
103 lines (84 loc) · 3.4 KB
/
buildLGPL.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
<project name="jpedal" default="build" basedir=".">
<!-- ===================== Initialize Property Values =================== -->
<property name="build.compiler" value="modern"/>
<property name="build.dir" location="build"/>
<property name="example.dir" location="example"/>
<!-- the directory where your additional jar files are-->
<property name="lib.dir" location="../../workspace/library"/>
<property name="dist.dir" location="dist"/>
<property name="src.dir" value="src"/>
<property name="bin.dir" value="bin"/>
<property name="api.dir" value="javadoc"/>
<property name="user.real" value="${user.name}"/>
<property name="example_javadocs.dir" value="example_javadocs"/>
<property name="debug" value="off"/>
<property name="deprecation=" value="off"/>
<property name="optimize=" value="off"/>
<property name="classpath" value="."/>
<property name="jpedal.jar" value="os_jpedal.jar"/>
<!-- =================== INITIALIZE: =================================== -->
<target name="init" depends="">
<delete dir="${build.dir}"/>
<delete dir="${dist.dir}"/>
<delete dir="${api.dir}" />
<delete dir="${example_javadocs.dir}" />
<delete dir="examples" />
<delete dir="javadoc" />
<!-- useful if you want to add if constructs into build.xml
<taskdef resource="net/sf/antcontrib/antcontrib.properties" />
-->
<mkdir dir="${dist.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${build.dir}/${bin.dir}"/>
<tstamp/>
</target>
<!-- ================ BUILD: Copy res Files ========================== -->
<target name="copy-res" depends="compile">
<copy todir="${build.dir}/${bin.dir}">
<fileset dir="${src.dir}">
<include name="**/**/res/**"/>
<exclude name="**/*~"/>
<include name="**/international/*.properties" />
<include name="**/*.gif"/>
<include name="**/*.txt"/>
<exclude name="**/*.class"/>
<exclude name="**/*.xslt"/>
<exclude name="**/*.java"/>
<include name="**/examples/**/*.gif"/>
<include name="**/examples/**/**/*.gif"/>
<exclude name="**/.~[0-9]+~"/>
</fileset>
</copy>
</target>
<!-- ================ BUILD: Copy source Files ========================== -->
<target name="copy-src" depends="init">
<copy todir="${build.dir}/${src.dir}">
<fileset dir="${src.dir}">
</fileset>
</copy>
</target>
<!-- ======================= COMPILE: compile source ===================== -->
<target name="compile" depends="init,copy-src">
<javac srcdir="${build.dir}/${src.dir}" destdir="${build.dir}/${bin.dir}" >
<classpath>
<pathelement location="${lib.dir}/jai_core.jar" />
<pathelement location="${lib.dir}/jai_codec.jar" />
<pathelement location="${lib.dir}/bcmail.jar" />
<pathelement location="${lib.dir}/bcprov.jar" />
</classpath>
</javac>
</target>
<!-- ================== DIST: Create .jar file and flush code=================== -->
<target name="jar" depends="init,copy-res,compile">
<!-- build the jar -->
<jar destfile="${dist.dir}/${jpedal.jar}" index="true" basedir="${build.dir}/${bin.dir}">
<manifest>
<attribute name="Built-By" value="${user.real}" />
<attribute name="Main-Class" value="org.jpedal.examples.viewer.Viewer" />
</manifest>
</jar>
</target>
<!-- ================== DIST: create a build =================== -->
<target name="build" depends="jar">
</target>
</project>