forked from jonathankap/openwonderland-subsnapshot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
98 lines (81 loc) · 4.12 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="wonderland-subsnapshot-module" default="dist" basedir=".">
<!-- current directory needed in all scripts -->
<dirname property="current.dir" file="${ant.file.wonderland-subsnapshot-module}"/>
<!-- import properties from the common modules properties. These values
may overwrite some values in my.module.properties, such as the
location of the Wonderland directory in the case of the entire modules
directory being checked out instead of an individual file -->
<property file="${current.dir}/../modules-unstable.properties"/>
<!-- import properties for this module -->
<property file="${current.dir}/my.module.properties"/>
<property name="modules.dir" location="${wonderland.dir}/modules"/>
<property name="module.src" value="${module.plugin.src}"/>
<property name="module.jarname" value="${module.name}"/>
<property name="test.lib" value="lib_test" />
<property name="test.classes" value="src/test" />
<!--property name="test.class.name" value="org.jdesktop.wonderland.modules.subsnapshots.client.SubsnapshotContextMenuFactoryTest"/-->
<property name="test.compiled.classes" value="build/test" />
<!-- import common build file -->
<import file="${modules.dir}/build-tools/build-scripts/module-build.xml"/>
<!-- this module depends on the content repository module -->
<pathconvert property="module-client.classpath">
<path location="${modules.dir}/foundation/content-repository/build/client/contentrepo-client.jar"/>
</pathconvert>
<path id="test.classpath">
<pathelement location="${test.compiled.classes}" />
<pathelement location="${build.classes.dir}" />
<pathelement location="${modules.dir}/foundation/content-repository/build/client/contentrepo-client.jar"/>
<fileset dir="${test.lib}">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${wonderland.dir}/core/build/lib">
<include name="**/*.jar"/>
</fileset>
<pathelement path="${core-client.classpath}"/>
</path>
<target name="build" depends="-module-init, -module-compile-common,
-module-compile-server,
-module-compile-client,
-copy-resources"/>
<target name="-copy-resources">
<mkdir dir="build/classes/${module.src}/client/resources"/>
<copy todir="build/classes/${module.src}/client/resources">
<fileset dir="src/classes/${module.src}/client/resources/" />
</copy>
</target>
<target name="dist" depends="build">
<mkdir dir="${module.dist.dir}"/>
<module name="${module.name}" majorVersion="1" minorVersion="0" jarfile="${module.dist.dir}/${module.name}.jar" moduleDescription="${module.description}" builddir="${build.dir}">
<client>
<clientjar name="${module.name}-client" basedir="${build.classes.dir}">
<include name="${module.src}/client/**"/>
<include name="${module.src}/common/**"/>
</clientjar>
</client>
<server>
<serverjar name="${module.name}-server" basedir="${build.classes.dir}">
<include name="${module.src}/server/**"/>
<include name="${module.src}/common/**"/>
</serverjar>
</server>
</module>
</target>
<target name="deploy" depends="dist, -module-deploy"/>
<target name="clean" depends="-module-clean"/>
<target name="compile-tests" depends="build">
<mkdir dir="${test.compiled.classes}"/>
<javac srcdir="${test.classes}" destdir="${test.compiled.classes}" debug="true">
<classpath refid="test.classpath"/>
</javac>
</target>
<target name="test" depends="compile-tests">
<junit fork="yes" haltonfailure="yes">
<formatter type="plain" usefile="false" />
<classpath refid="test.classpath" />
<batchtest>
<fileset dir="${test.compiled.classes}" includes="**/*Test.class" />
</batchtest>
</junit>
</target>
</project>