-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
95 lines (73 loc) · 3.13 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
<project name="mxgraph-gwt" default="all" basedir="." >
<property environment="env"/>
<loadfile property="version" srcFile="VERSION" />
<!-- ===================== GWT Environment =========================== -->
<property name="gwt.args" value="" />
<!-- ===================== Project Environment =========================== -->
<property name="src.dir" value="${basedir}/src" />
<property name="examples.dir" value="${basedir}/examples" />
<property name="dist.dir" value="${basedir}/dist" />
<property name="root.package" value="com/mxgraph/gwt" />
<property name="public.dir" value="${root.package}/public" />
<property name="war.dir" value="${basedir}/war" />
<property name="javac.dir" value="${war.dir}/WEB-INF/classes" />
<property name="build.dir" value="${basedir}/build" />
<!-- ===================== GWT Compiler class path ========================= -->
<path id="gwt.class.path">
<pathelement location="war/WEB-INF/classes" />
<pathelement location="${env.GWT_HOME}/gwt-user.jar" />
<fileset dir="${env.GWT_HOME}" includes="gwt-dev*.jar" />
</path>
<!-- ===================== Java Compiler class path ========================= -->
<path id="javac.class.path">
<fileset dir="${env.GWT_HOME}" includes="*.jar" />
</path>
<!-- ============= Compiles the code with GWT compiler ====================== -->
<target name="gwtc">
<java failonerror="true" fork="true" classname="com.google.gwt.dev.Compiler">
<classpath>
<pathelement location="${dist.dir}/mxGraph-gwt-${version}.jar" />
<pathelement location="${examples.dir}" />
<path refid="gwt.class.path" />
</classpath>
<jvmarg value="-Xmx512M" />
<arg line="-war ${war.dir}" />
<arg line="-localWorkers 4" />
<!--<arg line="-logLevel TRACE" /> -->
<arg line="${gwt.args} com.mxgraph.gwt.showcase.mxGraphExample" />
</java>
</target>
<!-- ============= Compiles the code with Java compiler ====================== -->
<target name="javac">
<mkdir dir="${javac.dir}" />
<javac srcdir="src" includes="**/*.java" encoding="utf-8" destdir="war/WEB-INF/classes" source="1.6" target="1.6" debug="true" debuglevel="lines,vars,source">
<classpath refid="javac.class.path" />
</javac>
</target>
<!-- ============= Cleans the output directories ============================= -->
<target name="clean">
<delete>
<fileset dir="${dist.dir}">
</fileset>
<fileset dir="${javac.dir}">
</fileset>
<fileset dir="${build.dir}">
</fileset>
</delete>
</target>
<!-- ========= Creates a full version of mxGraph-GWT library ================== -->
<target name="dist" depends="javac">
<jar destfile="${dist.dir}/mxGraph-gwt-${version}.jar">
<fileset dir="${src.dir}">
</fileset>
<fileset dir="${javac.dir}">
</fileset>
</jar>
</target>
<target name="war" depends="gwtc" description="Create a war file">
<zip destfile="${build.dir}/Showcase.war" basedir="war" />
</target>
<!-- ======================== Performs all tasks ================================ -->
<target name="all" depends="clean,dist,war">
</target>
</project>