-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
151 lines (134 loc) · 5.4 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2011 The ARIES Consortium (http://www.ariesonline.org)
This file is part of ARIES.
ARIES is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
by the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.
ARIES is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with ARIES. If not, see <http://www.gnu.org/licenses/>.
-->
<project name="ARIES build file" default="help" basedir=".">
<property name="app.name" value="aries" />
<property name="app.version" value="1.0.0-beta" />
<property environment="env" />
<property name="build.home" value="${basedir}/build" />
<property name="aries.inst" value="${env.ARIES_HOME}" />
<path id="classpath">
<fileset dir="${env.THINKLAB_HOME}/lib" includes="*.jar" />
</path>
<typedef resource="org/java/plugin/tools/ant/jpf-tasks.properties">
<classpath refid="classpath" />
</typedef>
<target name="help">
<echo>
<![CDATA[
${app.name} build file:
clean - cleans up the project build folder
build - builds entire project
run - runs application
check - checks plug-ins integrity
docs - generates plug-ins documentation
dist - creates binary and source distribution packages
test - runs some tests
]]>
</echo>
</target>
<target name="clean" description="Cleans up the project build folder">
<tstamp>
<format property="dt-stamp" pattern="yyyy-MM-dd-HH-mm" />
<format property="d-stamp" pattern="yyyy-MM-dd" />
</tstamp>
<delete dir="${build.home}" quiet="true" />
</target>
<target name="-init">
<mkdir dir="${build.home}" />
</target>
<target name="-build-plugins">
<mkdir dir="${build.home}/plugins" />
<ant dir="plugins/org.integratedmodelling.aries.core" target="${target}" />
<ant dir="plugins/org.integratedmodelling.aries.marine" target="${target}" />
<ant dir="plugins/org.integratedmodelling.aries.valuation" target="${target}" />
<ant dir="plugins/org.integratedmodelling.aries.aries" target="${target}" />
<ant dir="plugins/org.integratedmodelling.aries.administration" target="${target}" />
<ant dir="plugins/org.integratedmodelling.aries.http.explorer" target="${target}" />
</target>
<target name="build" depends="-init" description="Builds entire project">
<antcall target="-build-plugins">
<param name="target" value="build" />
</antcall>
<copy todir="${build.home}/lib">
<fileset dir="${env.THINKLAB_HOME}/lib" includes="*.jar" />
</copy>
<jpf-version basedir="${build.home}/plugins"
includes="*/plugin.xml,*/plugin-fragment.xml"
versionsfile="${basedir}/plugins/versions.properties"
timestampversion="true" />
</target>
<target name="run" depends="build" description="Runs application">
<java jar="${build.home}/lib/im-boot.jar"
dir="${build.home}"
fork="true" />
</target>
<target name="check"
depends="build"
description="Checks plug-ins integrity">
<jpf-check basedir="${basedir}/plugins"
includes="*/plugin.xml,*/plugin-fragment.xml"
verbose="true"
usepathresolver="true" />
</target>
<target name="docs"
depends="build"
description="Generates plug-ins documentation">
<delete dir="${build.home}/docs" />
<mkdir dir="${build.home}/docs" />
<antcall target="-build-plugins">
<param name="target" value="docs" />
</antcall>
<jpf-doc basedir="${build.home}/plugins"
includes="*/plugin.xml,*/plugin-fragment.xml"
destdir="${build.home}/docs" />
</target>
<target name="install"
depends="build"
description="Install aries in ARIES_HOME (must be defined)">
<copy todir="${aries.inst}">
<fileset dir="${build.home}" includes="**/*" />
</copy>
</target>
<target name="dist"
depends="clean,build,docs"
description="Prepares distribution packages">
<zip destfile="${build.home}/${app.name}-bin-${app.version}.zip"
duplicate="fail"
update="false">
<fileset dir="${build.home}" includes="**/*" />
</zip>
<zip destfile="${build.home}/${app.name}-src-${app.version}.zip"
duplicate="fail"
update="false">
<fileset dir="${basedir}"
excludes="build,**/classes/**,.check*,.fb*,nbproject/private/**,build/**,logs/**,data/**,temp/**,*.zip,todo.txt,plugins/org.jpf.demo.toolbox.ftpmonitor/**" />
</zip>
<delete includeemptydirs="true">
<fileset dir="${build.home}">
<include name="**/*" />
<exclude name="${app.name}-???-${app.version}.zip" />
</fileset>
</delete>
</target>
<target name="test" depends="build" description="Some tests">
<jpf-pack basedir="${build.home}/plugins"
includes="*/plugin.xml,*/plugin-fragment.xml"
destfile="${build.home}/all-plugins.jpa" />
<mkdir dir="${build.home}/all-plugins-extracted" />
<jpf-unpack srcfile="${build.home}/all-plugins.jpa"
destdir="${build.home}/all-plugins-extracted" />
</target>
</project>