/[debian]/libjgraph-java/trunk/build.xml
ViewVC logotype

Contents of /libjgraph-java/trunk/build.xml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 816 - (show annotations)
Fri Aug 3 13:14:15 2007 UTC (13 years, 10 months ago) by gregoa
File MIME type: text/xml
File size: 7229 byte(s)
* New upstream release.
1 <!--
2
3 @(#)build.xml 1.0 03-JUL-04
4
5 Copyright (c) 2001-2004 Gaudenz Alder
6
7 -->
8
9 <!-- ===================== Project Properties =========================== -->
10
11 <project name="jgraph" default="all" basedir=".">
12
13 <property name="app.name" value="JGraph"/>
14 <property name="app.jar" value="jgraph.jar"/>
15 <property name="app.version" value="5.10.1.4"/>
16 <property name="longversion" value="5.10.1.4"/>
17
18 <!-- ===================== Project Environment =========================== -->
19
20 <property name="source.home" value="${basedir}/src"/>
21 <property name="example.home" value="${basedir}/examples"/>
22 <property name="example.class" value="com.jgraph.example.Main"/>
23
24 <!-- ==================== Compilation Options ==================== -->
25
26 <property name="compile.debug" value="false"/>
27 <property name="compile.deprecation" value="false"/>
28 <property name="compile.optimize" value="true"/>
29
30 <!-- ===================== Build Environment =========================== -->
31
32 <property name="build.home" value="${basedir}/build"/>
33 <property name="dist.home" value="${basedir}/dist"/>
34 <property name="dist.name" value="${ant.project.name}-${app.version}"/>
35
36 <!-- ==================== All ==================== -->
37
38 <target name="all" depends="dist"
39 description="Clean up and produce all distributions"/>
40
41 <!-- ==================== Clean ==================== -->
42
43 <target name="clean" description="Delete all generated files and directories">
44 <delete dir="${build.home}/"/>
45 <delete dir="${dist.home}/"/>
46 </target>
47
48 <!-- ==================== Init ==================== -->
49
50 <target name="init" description="Initialize the build Java ${java.specification.version} Build">
51 <tstamp/>
52 <mkdir dir="${build.home}"/>
53 <mkdir dir="${build.home}/classes"/>
54 <mkdir dir="${build.home}/doc"/>
55 <mkdir dir="${build.home}/doc/api"/>
56 <mkdir dir="${build.home}/lib"/>
57 </target>
58
59 <!-- ==================== Generate ==================== -->
60
61 <target name="generate" depends="init" description="Generate the build tree">
62 <copy todir="${build.home}/src">
63 <fileset dir="${source.home}" includes="**/*.java,**/*.html"/>
64 </copy>
65
66 <!-- Examples -->
67 <copy todir="${build.home}/examples">
68 <fileset dir="${example.home}" includes="**/*.java,**/*.gif"/>
69 </copy>
70
71 <!-- Update code for Java 1.3 if required -->
72 <ant antfile="migrate.xml" target="all"/>
73 </target>
74
75 <!-- ==================== Compile ==================== -->
76
77 <target name="compile" depends="generate" description="Compile the build tree">
78
79 <!-- Compile sources -->
80 <javac srcdir="${build.home}/src"
81 debug="${compile.debug}"
82 deprecation="${compile.deprecation}"
83 optimize="${compile.optimize}"
84 destdir="${build.home}/classes">
85 <classpath>
86 <pathelement path="${build.home}/classes"/>
87 </classpath>
88 </javac>
89
90 </target>
91
92 <!-- ==================== Apidoc ==================== -->
93
94 <target name="apidoc" depends="init" description="Generate the api specification (javadoc)">
95 <copy todir="${build.home}/doc">
96 <fileset dir="${basedir}/doc" includes="**/*"/>
97 </copy>
98 <javadoc packagenames="org.jgraph.*"
99 sourcepath="${build.home}/src"
100 classpath="${build.home}/classes"
101 destdir="${build.home}/doc/api"
102 use="true"
103 author="false"
104 version="false"
105 windowtitle="${app.name} v${app.version} API Specification"
106 doctitle="${app.name} v${app.version} API Specification">
107 <header><![CDATA[<p><b>${app.name}</b><br>v${app.version}</p>]]></header>
108 <bottom><![CDATA[<font size=1>Copyright (C) 2001-2006 <a href="http://www.jgraph.com/"
109 target="_blank">Gaudenz Alder</a>. All rights reserved.</font>]]></bottom>
110 <link href="http://java.sun.com/j2se/${java.specification.version}/docs/api"/>
111 </javadoc>
112 </target>
113
114 <!-- ==================== Doc ==================== -->
115
116 <target name="doc" depends="apidoc" description="Generate all documentation"/>
117
118 <!-- ==================== Jar ==================== -->
119
120 <target name="jar" depends="compile, doc" description="Build all Java archives (JARs)">
121 <jar jarfile="${build.home}/lib/${app.jar}" basedir="${build.home}/classes"/>
122 </target>
123
124 <!-- ==================== Build ==================== -->
125
126 <target name="build" depends="jar"
127 description="Run all tasks to completely populate the build directory"/>
128
129 <!-- ==================== Distclean ==================== -->
130
131 <target name="distclean" description="Clean up the distribution files only">
132 <delete dir="${dist.home}/"/>
133 </target>
134
135 <!-- ==================== Dist ==================== -->
136
137 <target name="dist" depends="build" description="Produce fresh distributions">
138 <mkdir dir="${dist.home}"/>
139
140 <!-- ==================== Binary Distribution ==================== -->
141 <mkdir dir="${dist.home}/${dist.name}"/>
142
143 <copy file="${basedir}/ChangeLog" todir="${dist.home}/${dist.name}"/>
144 <copy file="${basedir}/LICENSE" todir="${dist.home}/${dist.name}"/>
145 <copy file="${basedir}/README" todir="${dist.home}/${dist.name}"/>
146 <copy file="${basedir}/WHATSNEW" todir="${dist.home}/${dist.name}"/>
147 <copy file="${build.home}/lib/${app.jar}" todir="${dist.home}/${dist.name}/lib"/>
148
149 <copy todir="${dist.home}/${dist.name}/doc">
150 <fileset dir="${build.home}/doc" includes="**/*"/>
151 </copy>
152
153 <mkdir dir="${dist.home}/${dist.name}/examples"/>
154 <copy todir="${dist.home}/${dist.name}/examples">
155 <fileset dir="${example.home}" includes="**/org/**/*.gif,**/org/**/*.java,**/com/**/*.gif,**/com/**/*.java"/>
156 </copy>
157
158 <!-- Compress -->
159 <zip destfile="${dist.home}/${dist.name}.zip"
160 basedir="${dist.home}/${dist.name}"
161 />
162
163 <!-- ==================== Source Distribution ==================== -->
164 <!-- Extends binary distribution -->
165 <copy todir="${dist.home}/${dist.name}-src">
166 <fileset dir="${dist.home}/${dist.name}" includes="**/*"/>
167 </copy>
168
169 <!-- Add source tree -->
170 <copy todir="${dist.home}/${dist.name}-src/src">
171 <fileset dir="${build.home}/src" includes="**/*"/>
172 </copy>
173
174 <!-- Add build file -->
175 <copy file="${basedir}/migrate.xml" todir="${dist.home}/${dist.name}-src"/>
176 <copy file="${basedir}/build.xml" todir="${dist.home}/${dist.name}-src"/>
177 </target>
178
179 <!-- ==================== Example ==================== -->
180
181 <target name="compile-example" depends="compile" description="Compile the main example">
182 <mkdir dir="${build.home}/examples"/>
183
184 <!-- Compile examples -->
185 <javac srcdir="${example.home}"
186 debug="${compile.debug}"
187 deprecation="${compile.deprecation}"
188 optimize="${compile.optimize}"
189 destdir="${build.home}/examples">
190 <classpath>
191 <pathelement path="${build.home}/classes"/>
192 <pathelement path="${build.home}/examples"/>
193 </classpath>
194 </javac>
195
196 </target>
197
198 <!-- ==================== Test ==================== -->
199
200 <target name="example" depends="compile-example" description="Run the main example">
201
202 <!-- Run main example -->
203 <java fork="true" classname="${example.class}">
204 <arg value="test.png"/>
205 <classpath>
206 <pathelement path="${build.home}/classes"/>
207 <pathelement path="${build.home}/examples"/>
208 </classpath>
209 </java>
210
211 </target>
212
213
214 </project>
215

  ViewVC Help
Powered by ViewVC 1.1.26