-
Notifications
You must be signed in to change notification settings - Fork 57
Expand file tree
/
Copy pathbuild.xml
More file actions
116 lines (97 loc) · 3.56 KB
/
build.xml
File metadata and controls
116 lines (97 loc) · 3.56 KB
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
<project name="mirth-cli" basedir="." default="build">
<target name="init">
<property file="build.properties" />
<path id="classpath">
<fileset dir="${lib}" includes="*.jar" />
</path>
</target>
<target name="clean" depends="init">
<delete dir="${classes}" />
<delete dir="${build}" />
<delete dir="${dist}" />
<delete dir="${test_classes}" />
</target>
<target name="compile" depends="clean, init">
<mkdir dir="${classes}" />
<javac srcdir="${src}" destdir="${classes}" debug="on" includeAntRuntime="false">
<classpath refid="classpath" />
</javac>
</target>
<target name="build" depends="compile">
<mkdir dir="${build}" />
<!-- log4j2.properties file -->
<mkdir dir="${build}/conf" />
<copy todir="${build}/conf">
<fileset dir="${conf}" />
</copy>
<!-- cli-lib -->
<mkdir dir="${build}/cli-lib" />
<copy todir="${build}/cli-lib">
<fileset dir="${lib}" />
</copy>
<jar destfile="${build}/${cli.jar}" basedir="${classes}">
<include name="com/mirth/connect/cli/**" />
<exclude name="com/mirth/connect/cli/launcher/**" />
</jar>
<jar destfile="${build}/${cli-launcher.jar}" basedir="${classes}">
<include name="com/mirth/connect/cli/launcher/**" />
<manifest>
<attribute name="Main-Class" value="com.mirth.connect.cli.launcher.CommandLineLauncher" />
<attribute name="Class-Path" value="cli-lib/log4j-api-2.17.2.jar cli-lib/log4j-core-2.17.2.jar cli-lib/commons-io-2.13.0.jar conf/" />
</manifest>
</jar>
</target>
<target name="test-init" depends="init">
<delete dir="${test_classes}" />
<path id="testclasspath">
<path refid="classpath" />
<fileset dir="${testlib}" includes="**/*.jar" />
<dirset dir="${classes}"/>
</path>
</target>
<target name="test-compile" depends="test-init">
<!-- compile the source -->
<mkdir dir="${test_classes}" />
<javac srcdir="${test}" destdir="${test_classes}" debug="on" includeAntRuntime="false">
<classpath refid="testclasspath" />
</javac>
</target>
<path id="jacoco.classpath">
<fileset dir="../server/lib/ant">
<include name="org.jacoco.ant-0.8.8.jar"/>
<include name="org.jacoco.core-0.8.8.jar"/>
<include name="org.jacoco.report-0.8.8.jar"/>
<include name="org.jacoco.agent-0.8.8.jar"/>
<include name="asm-9.2.jar"/>
<include name="asm-tree-9.2.jar"/>
<include name="asm-commons-9.2.jar"/>
</fileset>
</path>
<taskdef uri="antlib:org.jacoco.ant"
resource="org/jacoco/ant/antlib.xml"
classpathref="jacoco.classpath"/>
<target name="test-run" depends="test-compile">
<property name="junit-reports" value="junit-reports" />
<property name="code-coverage-reports" value="code-coverage-reports" />
<mkdir dir="${junit-reports}" />
<mkdir dir="${code-coverage-reports}" />
<jacoco:coverage destfile="${code-coverage-reports}/jacoco.exec" xmlns:jacoco="antlib:org.jacoco.ant" exclclassloader="sun.reflect.DelegatingClassLoader:javassist.Loader" >
<junit haltonfailure="false" fork="true" forkmode="once">
<jvmarg value="-Xms128m" />
<jvmarg value="-Xmx2048m" />
<!-- https://stackoverflow.com/questions/54205486 -->
<jvmarg value="-Xshare:off" />
<classpath>
<path refid="testclasspath" />
<dirset dir="${test_classes}"/>
</classpath>
<formatter type="xml" />
<batchtest todir="${junit-reports}">
<fileset dir="${test_classes}">
<include name="**/*Test.class" />
</fileset>
</batchtest>
</junit>
</jacoco:coverage>
</target>
</project>