-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.xml
executable file
·120 lines (102 loc) · 3.76 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
<project>
<property environment="env"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="SRC_PATH" value="comodo2/src"/>
<property name="TEST_PATH" value="comodo2/test"/>
<property name="WRAPPER_PATH" value="wrapper/src"/>
<property name="LIB_PATH" value="libs"/>
<property name="BIN_PATH" value="build/jar" />
<property name="CLASSES_PATH" value="build/classes" />
<property name="INSTALL_PATH" value="${env.PREFIX}" />
<!-- Classpath !-->
<path id="comodo2.classpath">
<fileset dir="${LIB_PATH}/" includes="*.jar"/>
<fileset dir="${SRC_PATH}"/>
</path>
<target name="clean">
<echo message="Deleting build/ and gen/ directories"/>
<delete dir="build"/>
<delete dir="gen"/>
</target>
<target name="compile">
<echo message="Compiling comodo2 source files"/>
<mkdir dir="${CLASSES_PATH}"/>
<javac debug="true" debuglevel="${debuglevel}" includeantruntime="false" srcdir="${SRC_PATH}" destdir="${CLASSES_PATH}">
<classpath refid="comodo2.classpath"/>
</javac>
</target>
<target name="jar">
<echo message="Creating comodo2.jar file"/>
<mkdir dir="${BIN_PATH}"/>
<jar destfile="${BIN_PATH}/comodo2.jar" basedir="${CLASSES_PATH}">
<fileset dir="${SRC_PATH}"/>
<manifest>
<attribute name="Main-Class" value="comodo2.engine.Main"/>
</manifest>
</jar>
</target>
<target name="build" depends="compile,jar">
</target>
<target name="install">
<echo message="Installing comodo2.jar and required .jar into ${INSTALL_PATH}/lib"/>
<copy todir="${INSTALL_PATH}/lib">
<fileset dir="${LIB_PATH}" includes="*.jar"/>
</copy>
<copy file="${BIN_PATH}/comodo2.jar" todir="${INSTALL_PATH}/lib"/>
<echo message="Installing comodo wrapper into ${INSTALL_PATH}/bin"/>
<copy file="${WRAPPER_PATH}/comodo.j2" tofile="${INSTALL_PATH}/bin/comodo"/>
<replace file="${INSTALL_PATH}/bin/comodo" token="{{ classpath }}" value="${INSTALL_PATH}/lib/*"/>
<chmod file="${INSTALL_PATH}/bin/comodo" perm="755"/>
</target>
<target name="test1" depends="clean,compile,jar,install">
<exec executable="/bin/bash" failonerror="true">
<arg value="${INSTALL_PATH}/bin/comodo"/>
<arg value="-i"/>
<arg value="test/elt/model/hello/EELT_ICS_ApplicationFramework.uml"/>
<arg value="-o"/>
<arg value="./gen"/>
<arg value="-m"/>
<arg value="hellomalif hellomal"/>
<arg value="-t"/>
<arg value="ELT-RAD"/>
<arg value="-g"/>
<arg value="ALL"/>
<arg value="-n"/>
<arg value="-a"/>
<arg value="-d"/>
</exec>
<exec executable="diff" failonerror="true">
<arg value="gen/"/>
<arg value="test/elt/ref/hello/"/>
</exec>
</target>
<target name="test2" depends="clean, compile, jar, install">
<exec executable="/bin/bash" failonerror="true">
<arg value="${INSTALL_PATH}/bin/comodo"/>
<arg value="-i"/>
<arg value="test/elt/model/hello/EELT_ICS_ApplicationFramework.uml"/>
<arg value="-o"/>
<arg value="./gen"/>
<arg value="-m"/>
<arg value="hellomalif2 externalif2 hellomal2"/>
<arg value="-t"/>
<arg value="ELT-RAD"/>
<arg value="-g"/>
<arg value="ALL"/>
<arg value="-n"/>
<arg value="-a"/>
<arg value="-d"/>
</exec>
<exec executable="diff" failonerror="true">
<arg value="gen/"/>
<arg value="test/elt/ref/hello2/"/>
</exec>
</target>
<target name="test">
<antcall target="clean"/>
<antcall target="test1"/>
<antcall target="clean"/>
<antcall target="test2"/>
<antcall target="clean"/>
</target>
</project>