-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
179 lines (174 loc) · 7.31 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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!--- THIS IS AN OLD FILE AND ONLY INCLUDED AS A REFERENCE IN CASE YOU WANT TO TAKE A LOOK -->
<?xml version="1.0" encoding="UTF-8"?>
<!--- some exml comment -->
<project name="Memoranda" default="package" basedir=".">
<!-- Build.xml file initially created by Kenneth J. Pouncey -->
<!-- on 5 september 2003. -->
<!-- Kenneth is the project-leader of the tn5250j-project on SourceForge -->
<!-- Thank you dude for your contribution to our project ! -->
<!-- You can reach him through email : [email protected] -->
<!--=====================================================================-->
<!--$Id: build.xml,v 1.18 2007/04/06 21:12:24 alexeya Exp $-->
<!-- set global properties for this build -->
<property name="name" value="memoranda"/>
<property name="version" value="1.0-rc3.1"/>
<property name="source.dir" value="${basedir}/src"/>
<property name="lib.dir" value="${basedir}/lib"/>
<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes.dir" value="${build.dir}"/>
<property name="main.class" value="net.sf.memoranda.Start"/>
<property name="jarname" value="${name}.jar"/>
<property name="dist.dir" value="${basedir}/dist"/>
<!-- compile options -->
<property name="debug" value="off"/>
<property name="debuglevel" value="lines,vars,source"/>
<property name="optimize" value="off"/>
<property name="deprecation" value="off"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build.dir}"/>
</target>
<!-- classpath -->
<path id="classpath">
<pathelement path="${build.classes.dir}"/>
<fileset dir="lib">
<include name="*.jar"/>
<include name="*.zip"/>
</fileset>
</path>
<!-- =================================================================== -->
<!-- Creates the Jar -->
<!-- =================================================================== -->
<target name="package" depends="clean,compile" description="Create a Jar-File of your compiled classes">
<tstamp>
<format property="ts" pattern="MM/dd/yyyy HH:mm:ss z"/>
</tstamp>
<jar jarfile="${build.dir}/${jarname}">
<fileset dir="${build.classes.dir}" includes="*net/**"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
<!--<attribute name="Class-Path" value="${runtime.classpath}"/>-->
<attribute name="Implementation-Title" value="${name}"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="http://memoranda.sf.net"/>
<attribute name="Build-Id" value="${DSTAMP}.${build.number} (${ts} ${user.name} [${os.name} ${os.version} ${os.arch}])"/>
</manifest>
</jar>
</target>
<target name="compile" depends="init">
<!-- Compile the java code from ${src} into ${build} -->
<buildnumber/>
<move file="${source.dir}/net/sf/memoranda/ui/App.java" tofile="${source.dir}/net/sf/memoranda/ui/~~App.java"/>
<copy file="${source.dir}/net/sf/memoranda/ui/~~App.java" tofile="${source.dir}/net/sf/memoranda/ui/App.java"/>
<replace file="${source.dir}/net/sf/memoranda/ui/App.java" token="@VERSION@" value="${version}"/>
<replace file="${source.dir}/net/sf/memoranda/ui/App.java" token="@BUILD@" value="${DSTAMP}.${build.number}"/>
<javac srcdir="${source.dir}" destdir="${build.classes.dir}" excludes="**/Cvs/**,**/*.ini,**/~*" debug="${debug}" debuglevel="${debuglevel}" optimize="${optimize}" deprecation="${deprecation}" failonerror="false" source="1.8" target="1.8" encoding="utf-8">
<!-- <compilerarg value="-Xlint:unchecked"/> -->
<classpath>
<path refid="classpath"/>
</classpath>
</javac>
<move file="${source.dir}/net/sf/memoranda/ui/~~App.java" tofile="${source.dir}/net/sf/memoranda/ui/App.java"/>
<delete file="${source.dir}/net/sf/memoranda/ui/~~App.java"/>
<copy todir="${build.classes.dir}/net/sf/memoranda/ui/resources">
<fileset dir="${source.dir}/net/sf/memoranda/ui/resources"/>
</copy>
<copy todir="${build.classes.dir}/net/sf/memoranda/ui/htmleditor/resources">
<fileset dir="${source.dir}/net/sf/memoranda/ui/htmleditor/resources"/>
</copy>
<copy todir="${build.classes.dir}/net/sf/memoranda/util/resources">
<fileset dir="${source.dir}/net/sf/memoranda/util/resources"/>
</copy>
<copy todir="${build.classes.dir}/net/sf/memoranda/util/localmessages">
<fileset dir="${source.dir}/net/sf/memoranda/util/localmessages"/>
</copy>
<copy todir="${basedir}/build">
<fileset dir="." includes="tasklist.dtd"/>
</copy>
</target>
<target name="checkbuild">
<available file="${build.dir}/${jarname}" property="build.present"/>
</target>
<target name="build-if-needed" depends="checkbuild" unless="build.present">
<antcall target="package"/>
</target>
<target name="dist-full" depends="init, build-if-needed">
<!-- Create the full distribution includes:
build (build\)
sources (src\)
dependencies (\lib)
-->
<property name="dist.content.dir" value="${dist.dir}/${name}${version}-${DSTAMP}"/>
<mkdir dir="${dist.content.dir}"/>
<copy todir="${dist.content.dir}/src">
<fileset dir="${source.dir}"/>
</copy>
<copy todir="${dist.content.dir}/build">
<fileset dir="${build.dir}" includes="*.jar"/>
</copy>
<copy todir="${dist.content.dir}/lib">
<fileset dir="${lib.dir}"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="build.xml"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="LICENSE"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="memoranda.bat"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="memoranda.sh"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="README.txt"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="FAQ.txt"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="CHANGES.txt"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="BUILD.txt"/>
</copy>
<copy todir="${dist.content.dir}">
<fileset dir="." includes="tasklist.dtd"/>
</copy>
<zip zipfile="${dist.dir}/${name}${version}-${DSTAMP}.zip">
<fileset dir="${dist.dir}" includes="${name}${version}-${DSTAMP}/**"/>
</zip>
</target>
<target name="dist" depends="init, clean-dist">
<antcall target="dist-full"/>
</target>
<target name="clean">
<!-- Delete the ${build} directory tree -->
<delete dir="${build.dir}"/>
<!--<delete dir="${dist.dir}"/>-->
</target>
<target name="clean-dist">
<delete dir="${dist.dir}"/>
</target>
<!-- =================================================================== -->
<!-- Runs the compiled program -->
<!-- =================================================================== -->
<target name="run" depends="compile" description="Run the program">
<!--<copy todir="${build}">
<fileset dir="${lib.dir}" >
<include name="*.jar" />
<include name="*.zip" />
</fileset>
</copy>-->
<java classname="${main.class}" fork="true">
<classpath refid="classpath"/>
</java>
<!--
<java jar="${build.dir}/${jarname}" fork="yes">
<classpath refid="classpath"/>
</java> -->
</target>
</project>