forked from argouml-tigris-org/argouml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
148 lines (129 loc) · 5.64 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Id$
Build file to proxy the argoumlstandard ant targets.
-->
<project basedir="." default="jar" name="argouml">
<!-- =================================================================== -->
<!-- Initialization target -->
<!-- =================================================================== -->
<target name="init">
<property name="build.dir" value="build"/>
<path id="run.classpath">
<fileset dir="${build.dir}" includes="*.jar"/>
<fileset dir="${build.dir}/ext" includes="*.jar"/>
</path>
</target>
<!-- =================================================================== -->
<!-- Run from jars -->
<!-- =================================================================== -->
<target name="run" depends="install"
description="Run with this module.">
<java classname="org.argouml.application.Main"
fork="yes"
taskname="argouml"
maxmemory="500M">
<sysproperty key="log4j.configuration"
value="org/argouml/resource/error_console.lcf"/>
<classpath>
<path refid="run.classpath"/>
</classpath>
</java>
</target>
<!-- =================================================================== -->
<!-- Run from jars -->
<!-- =================================================================== -->
<target name="debug" depends="install"
description="Run and attach using a debugger.">
<java classname="org.argouml.application.Main"
fork="yes"
taskname="argouml"
maxmemory="500M">
<jvmarg value="-Xdebug"/>
<jvmarg value="-Xnoagent"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=5555,server=y,suspend=y"/>
<sysproperty key="log4j.configuration"
value="org/argouml/resource/error_console.lcf"/>
<classpath>
<path refid="run.classpath"/>
</classpath>
</java>
</target>
<!-- =================================================================== -->
<!-- Creates the jar files -->
<!-- =================================================================== -->
<target name="jar" depends="init"
description="Build and copies files.">
<ant dir="src/argouml-build" inheritAll="false" target="package"/>
</target>
<!-- =================================================================== -->
<!-- Copy files from argouml/src/argouml-build to argouml/build -->
<!-- =================================================================== -->
<target name="install" depends="init, jar"
description="">
<mkdir dir="${build.dir}"/>
<copy todir="${build.dir}" includeEmptyDirs="false">
<fileset dir="src/argouml-build/build">
<include name="*"/>
</fileset>
</copy>
<mkdir dir="${build.dir}/ext"/>
<copy todir="${build.dir}/ext" includeEmptyDirs="false">
<fileset dir="src/argouml-build/build/ext">
<include name="*"/>
</fileset>
</copy>
</target>
<!-- =================================================================== -->
<!-- Update argouml.jar manifest with any jars found in new location -->
<!-- (i.e. include anything in ext/*.jar -->
<!-- =================================================================== -->
<target name="update-argouml.jar-manifest" depends="init">
<property name="manifest.update" value="mf.mf"/>
<fileset dir="${build.dir}" id="classpath.jars" >
<include name="**/*.jar" />
</fileset>
<pathconvert pathsep=" " property="cp" refid="classpath.jars" dirsep="/" >
<mapper>
<globmapper from="${basedir}/${build.dir}/*" to="*" handledirsep="yes" />
</mapper>
</pathconvert>
<echo message="Class-Path: ${cp}" file="${build.dir}/${manifest.update}" />
<jar update="true"
basedir="${build.dir}"
includes="no-files"
manifest="${build.dir}/${manifest.update}"
jarfile="${build.dir}/argouml.jar"/>
<delete>
<fileset dir="${build.dir}">
<include name="${manifest.update}"/>
</fileset>
</delete>
</target>
<!-- =================================================================== -->
<!-- Targets for tests -->
<!-- =================================================================== -->
<target name="tests-xml"
description="Run normal tests.">
<ant dir="src/argouml-build" inheritAll="false" target="tests-xml"/>
</target>
<target name="tests"
description="Run normal tests and build reports.">
<ant dir="src/argouml-build" inheritAll="false" target="tests"/>
</target>
<target name="guitests"
description="Run the GUI tests and build reports.">
<ant dir="src/argouml-build" inheritAll="false" target="guitests"/>
</target>
<target name="alltests"
description="Run all tests and build reports.">
<ant dir="src/argouml-build" inheritAll="false" target="alltests"/>
</target>
<!-- =================================================================== -->
<!-- Clean targets -->
<!-- =================================================================== -->
<target name="clean" depends="init"
description="Clean out all built files.">
<delete dir="${build.dir}" quiet="true"/>
<ant dir="src/argouml-build" inheritAll="false" target="clean"/>
</target>
</project>