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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1490 - (show annotations)
Sat Nov 15 13:34:17 2008 UTC (12 years, 5 months ago) by gregoa
File MIME type: text/xml
File size: 7056 byte(s)
New upstream release.
1 <!--
2
3 @(#)build.xml 1.0 03-JUL-04
4
5 Copyright (c) 2001-2008 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.12.2.1"/>
16 <property name="longversion" value="5.12.2.1"/>
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 </target>
71
72 <!-- ==================== Compile ==================== -->
73
74 <target name="compile" depends="generate" description="Compile the build tree">
75
76 <!-- Compile sources -->
77 <javac srcdir="${build.home}/src"
78 debug="${compile.debug}"
79 deprecation="${compile.deprecation}"
80 optimize="${compile.optimize}"
81 destdir="${build.home}/classes">
82 <classpath>
83 <pathelement path="${build.home}/classes"/>
84 </classpath>
85 </javac>
86
87 </target>
88
89 <!-- ==================== Apidoc ==================== -->
90
91 <target name="apidoc" depends="init" description="Generate the api specification (javadoc)">
92 <copy todir="${build.home}/doc">
93 <fileset dir="${basedir}/doc" includes="**/*"/>
94 </copy>
95 <javadoc packagenames="org.jgraph.*"
96 sourcepath="${build.home}/src"
97 classpath="${build.home}/classes"
98 destdir="${build.home}/doc/api"
99 use="true"
100 author="false"
101 version="false"
102 windowtitle="${app.name} v${app.version} API Specification"
103 doctitle="${app.name} v${app.version} API Specification">
104 <header><![CDATA[<p><b>${app.name}</b><br>v${app.version}</p>]]></header>
105 <bottom><![CDATA[<font size=1>Copyright (C) 2001-2008 <a href="http://www.jgraph.com/"
106 target="_blank">Gaudenz Alder</a>. All rights reserved.</font>]]></bottom>
107 <link href="http://java.sun.com/j2se/${java.specification.version}/docs/api"/>
108 </javadoc>
109 </target>
110
111 <!-- ==================== Doc ==================== -->
112
113 <target name="doc" depends="apidoc" description="Generate all documentation"/>
114
115 <!-- ==================== Jar ==================== -->
116
117 <target name="jar" depends="compile, doc" description="Build all Java archives (JARs)">
118 <jar jarfile="${build.home}/lib/${app.jar}" basedir="${build.home}/classes"/>
119 </target>
120
121 <!-- ==================== Build ==================== -->
122
123 <target name="build" depends="jar"
124 description="Run all tasks to completely populate the build directory"/>
125
126 <!-- ==================== Distclean ==================== -->
127
128 <target name="distclean" description="Clean up the distribution files only">
129 <delete dir="${dist.home}/"/>
130 </target>
131
132 <!-- ==================== Dist ==================== -->
133
134 <target name="dist" depends="build" description="Produce fresh distributions">
135 <mkdir dir="${dist.home}"/>
136
137 <!-- ==================== Binary Distribution ==================== -->
138 <mkdir dir="${dist.home}/${dist.name}"/>
139
140 <copy file="${basedir}/ChangeLog" todir="${dist.home}/${dist.name}"/>
141 <copy file="${basedir}/LICENSE" todir="${dist.home}/${dist.name}"/>
142 <copy file="${basedir}/README" todir="${dist.home}/${dist.name}"/>
143 <copy file="${basedir}/WHATSNEW" todir="${dist.home}/${dist.name}"/>
144 <copy file="${build.home}/lib/${app.jar}" todir="${dist.home}/${dist.name}/lib"/>
145
146 <copy todir="${dist.home}/${dist.name}/doc">
147 <fileset dir="${build.home}/doc" includes="**/*"/>
148 </copy>
149
150 <mkdir dir="${dist.home}/${dist.name}/examples"/>
151 <copy todir="${dist.home}/${dist.name}/examples">
152 <fileset dir="${example.home}" includes="**/org/**/*.gif,**/org/**/*.java,**/com/**/*.gif,**/com/**/*.java"/>
153 </copy>
154
155 <!-- Compress -->
156 <zip destfile="${dist.home}/${dist.name}.zip"
157 basedir="${dist.home}/${dist.name}"
158 />
159
160 <!-- ==================== Source Distribution ==================== -->
161 <!-- Extends binary distribution -->
162 <copy todir="${dist.home}/${dist.name}-src">
163 <fileset dir="${dist.home}/${dist.name}" includes="**/*"/>
164 </copy>
165
166 <!-- Add source tree -->
167 <copy todir="${dist.home}/${dist.name}-src/src">
168 <fileset dir="${build.home}/src" includes="**/*"/>
169 </copy>
170
171 <!-- Add build file -->
172 <copy file="${basedir}/build.xml" todir="${dist.home}/${dist.name}-src"/>
173 </target>
174
175 <!-- ==================== Example ==================== -->
176
177 <target name="compile-example" depends="compile" description="Compile the main example">
178 <mkdir dir="${build.home}/examples"/>
179
180 <!-- Compile examples -->
181 <javac srcdir="${example.home}"
182 debug="${compile.debug}"
183 deprecation="${compile.deprecation}"
184 optimize="${compile.optimize}"
185 destdir="${build.home}/examples">
186 <classpath>
187 <pathelement path="${build.home}/classes"/>
188 <pathelement path="${build.home}/examples"/>
189 </classpath>
190 </javac>
191
192 </target>
193
194 <!-- ==================== Test ==================== -->
195
196 <target name="example" depends="compile-example" description="Run the main example">
197
198 <!-- Run main example -->
199 <java fork="true" classname="${example.class}">
200 <arg value="test.png"/>
201 <classpath>
202 <pathelement path="${build.home}/classes"/>
203 <pathelement path="${build.home}/examples"/>
204 </classpath>
205 </java>
206
207 </target>
208
209
210 </project>
211

  ViewVC Help
Powered by ViewVC 1.1.26