-
Notifications
You must be signed in to change notification settings - Fork 55
/
build.xml
170 lines (151 loc) · 6.23 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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
<project name="ClinicalTrialProcessor" default="all" basedir=".">
<property name="build" value="${basedir}/build"/>
<property name="source" value="${basedir}/source"/>
<property name="java" value="${source}/java"/>
<property name="files" value="${source}/files"/>
<property name="resources" value="${source}/resources"/>
<property name="config" value="${source}/config"/>
<property name="installer" value="org/rsna/installer"/>
<property name="launcher" value="org/rsna/launcher"/>
<property name="runner" value="org/rsna/runner"/>
<property name="libraries" value="${basedir}/libraries"/>
<property name="products" value="${basedir}/products"/>
<property name="documentation" value="${basedir}/documentation"/>
<property name="title" value="CTP"/>
<property name="copyright" value="Copyright 2013 Radiological Society of North America"/>
<path id="classpath">
<pathelement location="${libraries}/util.jar"/>
<pathelement location="${libraries}/dcm4che.jar"/>
<pathelement location="${libraries}/getopt.jar"/>
<!--<pathelement location="${libraries}/log4j.jar"/>-->
<pathelement location="${libraries}/log4j/log4j-1.2-api-2.17.2.jar"/>
<pathelement location="${libraries}/log4j/log4j-api-2.17.2.jar"/>
<pathelement location="${libraries}/log4j/log4j-core-2.17.2.jar"/>
<pathelement location="${libraries}/edtftpj.jar"/>
<pathelement location="${libraries}/jdbm.jar"/>
<pathelement location="${libraries}/commons-compress-1.0.jar"/>
<pathelement location="${libraries}/imageio/jai_imageio-1.2-pre-dr-b04.jar"/>
<pathelement location="${libraries}/imageio/pixelmed_codec.jar"/>
<pathelement location="${libraries}/email/mailapi.jar"/>
<pathelement location="${libraries}/email/mail.jar"/>
<pathelement location="${libraries}/ftp/commons-logging-1.2.jar"/>
<pathelement location="${libraries}/ftp/commons-net-3.3.jar"/>
<pathelement location="${libraries}/ftp/commons-vfs2-2.0.jar"/>
<pathelement location="${libraries}/ftp/jsch-0.1.53.jar"/>
</path>
<property name="jarclasspath" value="
libraries/util.jar
libraries/log4j.jar
"/>
<target name="clean">
<delete dir="${build}" failonerror="false"/>
<delete dir="${documentation}" failonerror="false"/>
</target>
<target name="init">
<echo message="=================================================="/>
<echo message="Building ${ant.project.name}"/>
<echo message="=================================================="/>
<tstamp>
<format property="today" pattern="yyyy.MM.dd"/>
<format property="now" pattern="HH:mm:ss z"/>
</tstamp>
<echo message="Time now ${now}"/>
<echo message="ant.java.version = ${ant.java.version}" />
<mkdir dir="${build}"/>
<mkdir dir="${products}"/>
</target>
<target name="compile" depends="init">
<javac destdir="${build}" optimize="on"
classpathref="classpath"
includeantruntime="false"
debug="true" debuglevel="lines,vars,source">
<src path="${java}"/>
<!--<compilerarg value="-Xlint:unchecked"/>-->
</javac>
</target>
<target name="jar" depends="compile">
<mkdir dir="${build}/CTP"/>
<jar jarfile="${build}/CTP/Launcher.jar">
<manifest>
<attribute name="Main-Class" value="org.rsna.launcher.Launcher"/>
<attribute name="Date" value="${today} at ${now}"/>
<attribute name="Java-Version" value="${ant.java.version}"/>
<attribute name="Class-Path" value="${jarclasspath}"/>
</manifest>
<fileset dir="${build}"
includes="${launcher}/**" />
</jar>
<jar jarfile="${build}/CTP/Runner.jar">
<manifest>
<attribute name="Main-Class" value="org.rsna.runner.Runner"/>
<attribute name="Date" value="${today} at ${now}"/>
<attribute name="Java-Version" value="${ant.java.version}"/>
</manifest>
<fileset dir="${build}"
includes="${runner}/**" />
</jar>
<copy overwrite="true" todir="${build}">
<fileset dir="${resources}"/>
</copy>
<jar jarfile="${libraries}/CTP.jar">
<manifest>
<attribute name="Main-Class" value="org.rsna.ctp.ClinicalTrialProcessor"/>
<attribute name="Date" value="${today} at ${now}"/>
<attribute name="Java-Version" value="${ant.java.version}"/>
<attribute name="Class-Path" value="util.jar log4j.jar"/>
</manifest>
<fileset dir="${build}"
includes="**"
excludes="${installer}/**, ${launcher}/**, ${runner}/** CTP/Launcher.jar CTP/Runner.jar" />
</jar>
</target>
<target name="installer" depends="jar">
<mkdir dir="${build}/CTP/libraries"/>
<mkdir dir="${build}/CTP/libraries/email"/>
<mkdir dir="${build}/config"/>
<copy overwrite="true" todir="${build}/CTP">
<fileset dir="${files}" includes="**"/>
</copy>
<copy overwrite="true" todir="${build}/CTP/libraries">
<fileset dir="${libraries}" includes="*.*" excludes="jai_imageio.jar"/>
</copy>
<copy overwrite="true" todir="${build}/CTP/libraries/email">
<fileset dir="${libraries}/email" includes="*.*"/>
</copy>
<copy overwrite="true" todir="${build}/CTP/libraries/ftp">
<fileset dir="${libraries}/ftp" includes="*.*"/>
</copy>
<copy overwrite="true" todir="${build}/CTP/libraries/imageio">
<fileset dir="${libraries}/imageio" includes="*.*"/>
</copy>
<copy overwrite="true" todir="${build}/CTP/libraries/log4j">
<fileset dir="${libraries}/log4j" includes="*.*"/>
</copy>
<copy overwrite="true" todir="${build}/config">
<fileset dir="${config}" includes="*.*"/>
</copy>
<jar destfile="${products}/CTP-installer.jar">
<manifest>
<attribute name="Main-Class" value="org.rsna.installer.Installer"/>
<attribute name="Date" value="${today} at ${now}"/>
<attribute name="Java-Version" value="${ant.java.version}"/>
<attribute name="Description" value="CTP for clinical trials"/>
</manifest>
<fileset dir="${build}"
includes="${installer}/Installer** CTP/** config/**"/>
</jar>
</target>
<target name="javadocs">
<mkdir dir="${documentation}"/>
<javadoc destdir="${documentation}" sourcepath="${java}" classpathref="classpath"
doctitle="${title}" windowtitle="${title}" bottom="${copyright}">
<package name="org.*"/>
</javadoc>
</target>
<target name="all" depends="clean, installer, javadocs">
<tstamp>
<format property="end" pattern="HH:mm:ss"/>
</tstamp>
<echo message="Time now ${end}"/>
</target>
</project>