-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
109 lines (89 loc) · 3.14 KB
/
Copy pathbuild.xml
File metadata and controls
109 lines (89 loc) · 3.14 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project name="GBay" default="main" xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="output-temp" value="releases/temp" />
<property name="output-folder" value="releases/dist/${version}/" />
<property name="output-lib-folder" value="releases/lib" />
<property name="src" value="src/" />
<property name="output-filename" value="GBay" />
<property name="dependency"
value="lib/bcmail-jdk15on-150.jar;lib/bcpkix-jdk15on-150.jar;lib/bcprov-ext-jdk15on-150.jar;lib/bcprov-jdk15on-150.jar;lib/log4j-1.2.17.jar;lib/hessian-4.0.7.jar;lib/AGE.jar;lib/iaikPkcs11Wrapper.jar;lib/ezmorph.jar;lib/json-lib-2.2.2-jdk15.jar;lib/commons-codec-1.9.jar;lib/commons-io-2.1.jar" />
<property name="target" value="1.8" />
<target name="main"
depends="init, compile, copy.meta.files, package, export-dependency">
<echo>
GBay library version ${version} built.
</echo>
<copy file="${output-folder}/${output-filename}.jar" tofile="releases/dist/${version}/${output-filename}.jar" />
</target>
<target name="init">
<echo>
Initializing distribution environment
</echo>
<delete dir="${output-temp}" />
<mkdir dir="${output-folder}" />
<mkdir dir="${output-temp}" />
<mkdir dir="${output-lib-folder}" />
</target>
<target name="compile">
<echo>
Compiling source code
</echo>
<javac fork="yes" srcdir="${src}" destdir="${output-temp}"
debug="false" classpath="${dependency}" target="${target}">
</javac>
<copy file="version.txt" tofile="${output-temp}/ver.${version}-jdk1.7" />
</target>
<patternset id="meta.files">
<include name="**/*.xml" />
<include name="**/*.properties" />
</patternset>
<target name="copy.meta.files">
<copy todir="${output-temp}">
<fileset dir="${src}">
<patternset refid="meta.files" />
</fileset>
</copy>
</target>
<target name="package">
<echo>
Packaging the source code into jar
</echo>
<jar destfile="${output-folder}${output-filename}.jar" basedir="${output-temp}">
<manifest>
<attribute name="Author" value="pki.tools" />
<section name="Identification">
<attribute name="ID" value="GBay" />
<attribute name="Vendor" value="pki.tools" />
<attribute name="Contact" value="nilnull" />
<attribute name="Copyright" value="(C) pki.tools 2014-2020" />
</section>
</manifest>
</jar>
</target>
<target name="sign">
<echo>
Signing the with JCE
</echo>
<signjar jar="${output-folder}${output-filename}.jar" alias="gbay"
keystore="CodeSigning\\keystore.ks" storepass="${storepass}" />
</target>
<target name="export-dependency">
<echo>
Exporting dependency into distribution folder.
</echo>
<copy todir="${output-lib-folder}">
<fileset dir="lib">
<filename name="**/*.java" />
<filename name="**/*.properties" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${output-folder}" />
<delete dir="${output-temp}" />
<delete dir="${output-lib-folder}" />
</target>
<target name="jdk-version-clean">
<delete dir="${output-temp}" />
</target>
</project>