forked from jgraph/jgraphx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
124 lines (100 loc) · 4.17 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
<!--
$Id: jgraphx-build.xml,v 1.1 2012/11/15 13:26:44 gaudenz Exp $
Copyright (c) 2008 Gaudenz Alder
-->
<!-- ===================== Project Properties =========================== -->
<project name="mxgraph" default="all" basedir=".">
<property name="product.name" value="JGraph X"/>
<property name="product.version" value="2.1.1.2"/>
<property name="all.jar" value="jgraphx.jar"/>
<!-- ===================== Project Environment =========================== -->
<property name="source.home" value="${basedir}/src"/>
<property name="example.home" value="${basedir}/examples"/>
<!-- ==================== Compilation Options ==================== -->
<property name="compile.debug" value="false"/>
<property name="compile.deprecation" value="false"/>
<property name="compile.optimize" value="true"/>
<!-- ==================== All ==================== -->
<target name="all" depends="build"
description="Clean up and build the project"/>
<!-- ==================== Clean ==================== -->
<target name="clean" description="Deletes all generated files and directories">
<delete dir="${basedir}/classes"/>
<delete dir="${basedir}/docs"/>
<delete dir="${basedir}/lib"/>
</target>
<!-- ==================== Init ==================== -->
<target name="init" description="Initializes the build">
<tstamp/>
<mkdir dir="${basedir}/classes"/>
<mkdir dir="${basedir}/docs"/>
<mkdir dir="${basedir}/docs/api"/>
<mkdir dir="${basedir}/docs/manual"/>
<mkdir dir="${basedir}/lib"/>
</target>
<!-- ==================== Compile ==================== -->
<target name="compile" depends="init" description="Compiles the source tree">
<javac srcdir="${source.home}"
debug="${compile.debug}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
destdir="${basedir}/classes">
<classpath>
<pathelement path="${basedir}/classes"/>
</classpath>
</javac>
</target>
<!-- ==================== Doc ==================== -->
<target name="doc" depends="compile" description="Generates the API specification (javadoc)">
<javadoc packagenames="com.mxgraph.*"
sourcepath="${source.home}"
classpath="${basedir}/classes"
destdir="${basedir}/docs/api"
use="true"
author="false"
version="false"
windowtitle="${product.name} ${product.version} API Specification"
doctitle="${product.name} ${product.version} API Specification">
<header><![CDATA[<p><b>${product.name} ${product.version}</b></p>]]></header>
<bottom><![CDATA[<font size=1>Copyright (c) 2010 <a href="http://www.mxgraph.com/"
target="_blank">Gaudenz Alder</a>. All rights reserved.</font>]]></bottom>
<link href="http://download.oracle.com/javase/1.5.0/docs/api/"/>
</javadoc>
</target>
<!-- ==================== Build ==================== -->
<target name="build" depends="doc" description="Builds all Java archives (JARs)">
<jar jarfile="${basedir}/lib/${all.jar}">
<manifest>
<attribute name="Vendor" value="JGraph Ltd"/>
<attribute name="Bundle-Version" value="${product.version}"/>
<attribute name="Bundle-SymbolicName" value="com.mxgraph"/>
<attribute name="Main-Class" value="com.mxgraph.view.mxGraph"/>
</manifest>
<fileset dir="${source.home}">
<exclude name="**/*.java"/>
</fileset>
<fileset dir="${basedir}/classes">
<include name="com/mxgraph/**"/>
</fileset>
</jar>
<delete dir="${basedir}/classes"/>
</target>
<!-- ==================== Example ==================== -->
<target name="example" depends="build" description="Compiles the examples">
<javac srcdir="${example.home}" debug="${compile.debug}" deprecation="${compile.deprecation}"
optimize="${compile.optimize}" destdir="${example.home}">
<classpath>
<pathelement path="${basedir}/lib/${all.jar}"/>
</classpath>
</javac>
</target>
<!-- ==================== Editor ==================== -->
<target name="editor" depends="example" description="Runs the graph editor example">
<java fork="true" classname="com.mxgraph.examples.swing.GraphEditor">
<classpath>
<pathelement path="${example.home}"/>
<pathelement path="${basedir}/lib/${all.jar}"/>
</classpath>
</java>
</target>
</project>