forked from antfin/OpenHospital
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
95 lines (83 loc) · 2.95 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="Update OpenHospital" default="distribute" basedir=".">
<property file="build.properties" />
<path id="classpath">
<pathelement path="${commons.dir}/${bin.dir}" />
<pathelement path="${bin.dir}" />
<pathelement path="${res.dir}" />
<fileset dir="${main.dir}/${lib.dir}">
<include name="**/*.jar" />
</fileset>
</path>
<target name="clean" description="Delete old distribution files">
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${bin.dir}">
<include name="**/*" />
</fileset>
</delete>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${dist.dir}">
<include name="**/*" />
</fileset>
</delete>
</target>
<target name="build" description="Source compilation">
<mkdir dir="${bin.dir}" />
<javac deprecation="${compile.deprecation}" optimize="${compile.optimize}" includeantruntime="false" srcdir="${src.dir}" destdir="${bin.dir}" classpathref="classpath" debug="true">
<!-- character set of sources -->
<compilerarg value="-encoding" />
<compilerarg value="UTF8" />
<!--<compilerarg value="-Xlint"/>-->
</javac>
<copy todir="${bin.dir}">
<fileset dir="${src.dir}" includes="**/*.hbm.xml"/>
</copy>
</target>
<target name="rebuild" depends="clean,build" description="Sources rebuild" />
<target name="wrapper">
<mkdir dir="${dist.dir}" />
</target>
<target name="distribute" depends="clean,build,wrapper" description="Creates distribution files of application">
<mkdir dir="${dist.dir}/${lib.dir}" />
<mkdir dir="${dist.dir}/${bin.dir}" />
<!-- <jar jarfile="${dist.dir}/${bin.dir}/OH.jar" basedir="${bin.dir}" /> -->
<jar destfile="${dist.dir}/${bin.dir}/OH.jar">
<fileset dir="${bin.dir}" />
<metainf dir="${src.dir}/META-INF" includes="**/persistence.xml" />
</jar>
<copy file="startup.sh" todir="${dist.dir}" />
<copy file="SetupGSM.sh" todir="${dist.dir}" />
<copy file="startup.cmd" todir="${dist.dir}" />
<copy file="SetupGSM.cmd" todir="${dist.dir}" />
<copy file="oh.ico" todir="${dist.dir}" />
<chmod file="${dist.dir}/startup.sh" perm="+x" />
<chmod file="${dist.dir}/SetupGSM.sh" perm="+x" />
<copy todir="${dist.dir}/${rsc.dir}">
<fileset dir="${main.dir}/${rsc.dir}">
</fileset>
</copy>
<copy todir="${dist.dir}/${rpt.dir}">
<fileset dir="${main.dir}/${rpt.dir}">
</fileset>
</copy>
<mkdir dir="${dist.dir}/${rpt.dir}/PDF" />
<copy todir="${dist.dir}/${bundle.dir}">
<fileset dir="${main.dir}/${bundle.dir}">
</fileset>
</copy>
<copy todir="${dist.dir}/${lib.dir}">
<fileset dir="${main.dir}/${lib.dir}">
</fileset>
</copy>
<copy todir="${dist.dir}/${doc.dir}">
<fileset dir="${main.dir}/${doc.dir}">
<include name="**/*.pdf" />
<include name="**/*.txt" />
</fileset>
</copy>
<copy todir="${dist.dir}/${mysql.dir}">
<fileset dir="${main.dir}/${mysql.dir}/db">
</fileset>
</copy>
</target>
</project>