source: src/webapp/build.xml@ 38a2121

debian/bullseye
Last change on this file since 38a2121 was 2fa2ef8, checked in by Joachim Langenbach <joachim.langenbach@…>, 8 years ago

First version of webserver (HTML Frontend)

  • Property mode set to 100644
File size: 4.3 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project name="GNUBoatWebApp" default="dist">
3
4 <property name="builddir" value="../../build/webapp" override="true" />
5
6 <fileset dir="./common/resources/" id="filesCommonResources">
7 </fileset>
8 <fileset dir="./common/css/" id="filesCommonCss">
9 </fileset>
10 <fileset dir="./common/js/" id="filesCommonJs">
11 </fileset>
12 <fileset dir="../icon/" id="filesGnuboatIcons">
13 <include name="gnuboat-256-256-transparent.png"/>
14 </fileset>
15
16 <target name="prepare">
17 <echo msg="Making directory ${builddir}" />
18 <mkdir dir="${builddir}"/>
19 </target>
20 <target name="buildwebclient" depends="prepare">
21 <echo msg="Copying files to build directory"/>
22 <fileset dir="./webclient" id="filesWebclient">
23 <!-- <exclude name=""/> -->
24 </fileset>
25
26 <copy todir="${builddir}/webclient">
27 <fileset refid="filesWebclient"/>
28 </copy>
29 <copy todir="${builddir}/webclient/resources">
30 <fileset refid="filesGnuboatIcons"/>
31 <fileset refid="filesCommonResources"/>
32 </copy>
33 <copy todir="${builddir}/webclient/css">
34 <fileset refid="filesCommonCss"/>
35 </copy>
36 <copy todir="${builddir}/webclient/js">
37 <fileset refid="filesCommonJs"/>
38 </copy>
39 </target>
40 <target name="buildwebservice" depends="prepare">
41 <fileset dir="./webservice" id="filesWebservice">
42 <exclude name="mbtiles/**"/>
43 <exclude name="tests/**"/>
44 <exclude name="config/**"/>
45 </fileset>
46 <fileset dir="./webservice/mbtiles" id="filesWebserviceMaps">
47 <!-- <exclude name=""/> -->
48 </fileset>
49
50 <copy todir="${builddir}/webservice">
51 <fileset refid="filesWebservice"/>
52 </copy>
53 <copy todir="${builddir}/webservice/maps">
54 <fileset refid="filesWebserviceMaps"/>
55 </copy>
56 </target>
57 <target name="buildwebserver" depends="prepare">
58 <echo msg="Copying files to build directory"/>
59 <fileset dir="./webserver" id="filesWebserver">
60 <!-- <exclude name=""/> -->
61 </fileset>
62
63 <copy todir="${builddir}/webserver">
64 <fileset refid="filesWebserver"/>
65 </copy>
66 <copy todir="${builddir}/webserver/resources">
67 <fileset refid="filesGnuboatIcons"/>
68 <fileset refid="filesCommonResources"/>
69 </copy>
70 <copy todir="${builddir}/webserver/css">
71 <fileset refid="filesCommonCss"/>
72 </copy>
73 <copy todir="${builddir}/webserver/js">
74 <fileset refid="filesCommonJs"/>
75 </copy>
76 </target>
77
78 <fileset dir="${builddir}" id="filesWebApp"/>
79
80
81 <target name="dist" depends="buildwebservice,buildwebclient,buildwebserver,test">
82 <echo msg="Creating archive"/>
83 <tar destfile="${builddir}/..//gnuboat-webapp.tar.gz" compression="gzip">
84 <fileset refid="filesWebApp"/>
85 </tar>
86 <echo msg="Files copied and compressed in build directory weblcient.tar.gz OK!" />
87 </target>
88
89 <target name="testdist" depends="buildwebservice,buildwebclient,buildwebserver,test">
90 <echo msg="Install project into ${user.home}/public_html/gnuboat"/>
91 <fileset id="filesConfig" dir="./webservice/config">
92 <include name="config.php"/>
93 </fileset>
94 <fileset id="filesLogs" dir="./webservice/tests/logs">
95 <include name="*.log"/>
96 </fileset>
97
98 <copy todir="${user.home}/public_html/gnuboat">
99 <fileset refid="filesWebApp"/>
100 </copy>
101 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
102 <fileset refid="filesLogs"/>
103 </copy>
104 <copy todir="${user.home}/public_html/gnuboat/webservice/config">
105 <fileset refid="filesConfig"/>
106 </copy>
107 </target>
108
109 <target name="test">
110 <exec command="php phpunit-7.4.3.phar" passthru="true" checkreturn="true"/>
111 <!--<phpunit pharlocation="phpunit-4.8.9.phar" configuration="phpunit.xml" haltonfailure="true" haltonerror="true" printsummary="true" codecoverage="false">
112 <formatter type="plain" usefile="false"/> -->
113 <!--<formatter type="JUnit" usefile="true"/>-->
114<!-- <batchtest>
115 <fileset dir="webservice">
116 <include name="tests/*Test.php"/>
117 </fileset>
118 </batchtest>
119 </phpunit>-->
120 </target>
121
122 <target name="testdist-sample-logs" depends="testdist">
123 <echo msg="Install sample logs"/>
124 <fileset id="filesSampleLogs" dir="../../sample-logs">
125 <include name="*.log"/>
126 </fileset>
127 <fileset id="filesCalcLogs" dir="../../sample-logs/calc-demo">
128 <include name="*.log"/>
129 </fileset>
130 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
131 <fileset refid="filesSampleLogs"/>
132 <fileset refid="filesCalcLogs"/>
133 </copy>
134 </target>
135</project>
Note: See TracBrowser for help on using the repository browser.