-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.xml
115 lines (96 loc) · 4.61 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
<?xml version="1.0" encoding="utf-8"?>
<project name="Oryx Main Build Script">
<!-- Load additional properties -->
<property file="build.properties"/>
<property name="build-dir" value="build" />
<property name="target-dir" value="dist" />
<!-- Import ANT build scripts of sub projects -->
<import file="editor/build.xml"/>
<!--<import file="editor/test.xml"/>-->
<import file="poem-jvm/build.xml"/>
<import file="stick/build.xml"/>
<import file="mashup/build.xml"/>
<!-- (RE)BUILD EDITOR AND BACKEND -->
<target name="build-all" depends="build-editor, build-backend, generate-build-dependcy-graph" />
<target name="rebuild-all" depends="clean-editor, build-editor, clean-backend, build-backend" />
<!-- CLEAN EDITOR AND BACKEND -->
<target name="clean-all" depends="clean-editor, clean-backend">
<!-- the depencies are somewhat redundant at the moment, but also future-proof -->
<delete dir="${build-dir}"/>
<delete dir="${target-dir}"/>
</target>
<!-- DEPLOYMENT TARGETS (NO BUILD OF PROJECTS!) -->
<!-- (UN)DEPLOY EDITOR AND BACKEND -->
<target name="deploy-all" depends="deploy-editor, deploy-backend"/>
<target name="undeploy-all" depends="undeploy-editor, undeploy-backend"/>
<!-- (UN)DEPLOY EDITOR -->
<target name="deploy-editor">
<copy file="${target-dir}/oryx.war" todir="${deploymentdir}"/>
</target>
<target name="undeploy-editor">
<delete file="${deploymentdir}/oryx.war"/>
</target>
<target name="deploy-stencilsets">
<copy todir='${deploymentdir}/oryx/stencilsets'>
<fileset dir="${editor-src-root}/data/stencilsets"/>
</copy>
<echo>
Copied stencilsets into deployment destination
</echo>
</target>
<!-- (UN)DEPLOY REPOSITORY -->
<target name="deploy-backend">
<copy file="${target-dir}/backend.war" tofile="${deploymentdir}/backend.war"/>
</target>
<target name="undeploy-backend">
<delete file="${deploymentdir}/backend.war"/>
</target>
<!-- Generate dependency graph of Ant tasks using Grand
http://www.ggtools.net/grand/
Grand is distributed under the terms of the BSD License. -->
<target name="generate-build-dependcy-graph" depends="check-build-dependcy-graph" unless="buildDependencyGraph.isUpToDate">
<typedef resource="net/ggtools/grand/antlib.xml" classpath="buildApps/lib/grand-1.8.jar"/>
<grand output="build.dot">
<filter name="removenode" node="Oryx Editor" />
</grand>
<!-- the replaceregexp task requires ant-nodeps.jar and fails the build
if the library is not found
<typedef
name="replaceregexp"
classname="org.apache.tools.ant.taskdefs.optional.ReplaceRegExp"
classpath="buildApps/lib/ant-nodeps.jar" />
<replaceregexp file="build.dot"
match="Oryx (Repository|Editor|BuildApps|on a Stick)\."
replace="" flags="g" />
<replaceregexp file="build.dot"
match="^digraph"
replace="strict digraph" flags="s" byline="true" />
-->
<!-- sed is only available on unix systems
<exec executable="sed" failonerror="false" failifexecutionfails="false">
<arg line="-i -e 's/Oryx \(Repository\|Editor\|BuildApps\|on a Stick\).//' -e 's/^digraph/strict digraph/' build.dot"/>
</exec>
-->
<replace file="build.dot" token="Oryx Repository." />
<replace file="build.dot" token="Oryx Editor." />
<replace file="build.dot" token="Oryx BuildApps." />
<replace file="build.dot" token="Oryx on a Stick." />
<replace file="build.dot" token="digraph "" value="strict digraph "" />
<!-- the dot tool from http://graphviz.org/ is required
but it won't fail the build if not available -->
<exec executable="dot" failonerror="false" failifexecutionfails="false">
<arg line="-Tpng -o build-dependencies.png build.dot"/>
</exec>
<delete file="build.dot"/>
</target>
<!-- check if regeneration of build dependency graph is required -->
<target name="check-build-dependcy-graph">
<uptodate property="buildDependencyGraph.isUpToDate" targetfile="build-dependencies.png">
<srcfiles file="build.xml" />
<srcfiles file="editor/build.xml" />
<srcfiles file="poem-jvm/build.xml" />
<srcfiles file="stick/build.xml" />
<srcfiles file="MashUp/build.xml" />
</uptodate>
</target>
</project>