-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
107 lines (91 loc) · 4.14 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
<project name="USJava" default="build" basedir=".">
<target name="build" depends="init.build,build.woframework,javaclient,package" />
<target name="install" depends="init.install,build.woframework,javaclient" />
<target name="clean" depends="init.properties">
<delete dir="bin" />
<delete dir="dist" />
</target>
<!-- property determination -->
<target name="init.properties">
<property file="build.properties" />
<property name="wolips.properties" value="${user.home}${file.separator}Library${file.separator}Application Support${file.separator}WOLips${file.separator}wolips.properties" />
<property file="${wolips.properties}" />
<condition property="wo.properties.check.failed">
<not>
<and>
<isset property="wo.system.frameworks" />
<isset property="wo.local.frameworks" />
</and>
</not>
</condition>
<fail message="The properties 'wo.system.frameworks' and 'wo.local.frameworks' must be set. Check that your ${wolips.properties} is correct." if="wo.properties.check.failed" />
<property name="wo.install.root" value="${wo.local.frameworks}" />
<property name="build.framework.name" value="${project.name}" />
<property name="build.framework.name.lowercase" value="${project.name.lowercase}" />
</target>
<!-- basic initializations -->
<target name="init.install" depends="init.properties">
<tstamp />
<property name="dest.dir" value="${wo.install.root}" />
</target>
<target name="init.build" depends="init.properties">
<tstamp />
<property name="dest.dir" value="dist" />
</target>
<target name="package">
<tar destfile="${dest.dir}/${build.framework.name}.tar.gz"
compression="gzip"
longfile="gnu">
<tarfileset dir="${dest.dir}">
<include name="${build.framework.name}.framework/**"/>
</tarfileset>
</tar>
</target>
<!-- woproject tasks -->
<target name="build.woframework" depends="compile">
<taskdef name="woframework" classname="org.objectstyle.woproject.ant.WOFramework"/>
<woframework name="${build.framework.name}" destDir="${dest.dir}" customInfoPListContent="${customInfoPListContent}" principalClass="${principalClass}" eoAdaptorClassName="${eoAdaptorClassName}" javaVersion="${javaVersion}" cfbundleversion="${cfBundleVersion}" cfbundleshortversion="${cfBundleShortVersion}" cfbundleID="${cfBundleID}">
<classes dir="${classes.dir}">
<includesfile name="woproject/classes.include.patternset" />
<excludesfile name="woproject/classes.exclude.patternset" />
<exclude if="javaClient" name="**/client/**/*.*"/>
</classes>
<wsresources dir=".">
<includesfile name="woproject/wsresources.include.patternset" />
<excludesfile name="woproject/wsresources.exclude.patternset" />
</wsresources>
<resources dir=".">
<includesfile name="woproject/resources.include.patternset" />
<excludesfile name="woproject/resources.exclude.patternset" />
<exclude if="javaClient" name="**/client/**/*.*"/>
</resources>
<lib dir="Libraries">
<include name="*.jar" />
</lib>
</woframework>
</target>
<target name="javaclient" if="javaClient" depends="build.woframework">
<mkdir dir="${dest.dir}/${build.framework.name}.framework/WebServerResources/Java" />
<jar basedir="${classes.dir}" excludes="**/server/**/*.*, **/server/**/" jarfile="${dest.dir}/${build.framework.name}.framework/WebServerResources/Java/${build.framework.name}.jar"/>
</target>
<target name="compile" depends="init.build">
<taskdef name="wocompile" classname="org.objectstyle.woproject.ant.WOCompile" />
<mkdir dir="bin" />
<wocompile srcdir="Sources" destdir="bin">
<frameworks root="ProjectLocal" embed="false" eclipse="true" />
<frameworks root="External" embed="false" eclipse="true" />
<frameworks root="Local" embed="false" eclipse="true" />
<frameworks root="User" embed="false" eclipse="true" />
<frameworks root="System" embed="false" eclipse="true" />
<frameworks root="Network" embed="false" eclipse="true" />
<classpath>
<fileset dir="Libraries">
<include name="*.jar" />
</fileset>
<fileset dir="${wo.extensions}">
<include name="*.jar" />
</fileset>
</classpath>
</wocompile>
</target>
</project>