source: src/webapp/build.xml@ 2fa2ef8

debian/bullseye
Last change on this file since 2fa2ef8 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
RevLine 
[e82ce68]1<?xml version="1.0" encoding="UTF-8"?>
2<project name="GNUBoatWebApp" default="dist">
3
[e62038b]4 <property name="builddir" value="../../build/webapp" override="true" />
[e82ce68]5
[46eee06]6 <fileset dir="./common/resources/" id="filesCommonResources">
7 </fileset>
8 <fileset dir="./common/css/" id="filesCommonCss">
9 </fileset>
[3b7e9f6]10 <fileset dir="./common/js/" id="filesCommonJs">
11 </fileset>
[46eee06]12 <fileset dir="../icon/" id="filesGnuboatIcons">
13 <include name="gnuboat-256-256-transparent.png"/>
14 </fileset>
15
[e82ce68]16 <target name="prepare">
17 <echo msg="Making directory ${builddir}" />
18 <mkdir dir="${builddir}"/>
19 </target>
[6f38643]20 <target name="buildwebclient" depends="prepare">
[e82ce68]21 <echo msg="Copying files to build directory"/>
[24d4504]22 <fileset dir="./webclient" id="filesWebclient">
[e82ce68]23 <!-- <exclude name=""/> -->
24 </fileset>
25
[6f38643]26 <copy todir="${builddir}/webclient">
[24d4504]27 <fileset refid="filesWebclient"/>
[e82ce68]28 </copy>
[6f38643]29 <copy todir="${builddir}/webclient/resources">
[5149714]30 <fileset refid="filesGnuboatIcons"/>
[46eee06]31 <fileset refid="filesCommonResources"/>
32 </copy>
33 <copy todir="${builddir}/webclient/css">
34 <fileset refid="filesCommonCss"/>
35 </copy>
[3b7e9f6]36 <copy todir="${builddir}/webclient/js">
37 <fileset refid="filesCommonJs"/>
38 </copy>
[6f38643]39 </target>
40 <target name="buildwebservice" depends="prepare">
[89c32b1]41 <fileset dir="./webservice" id="filesWebservice">
[f03591a]42 <exclude name="mbtiles/**"/>
[c455d7b]43 <exclude name="tests/**"/>
[a50c18f]44 <exclude name="config/**"/>
[89c32b1]45 </fileset>
[6f38643]46 <fileset dir="./webservice/mbtiles" id="filesWebserviceMaps">
47 <!-- <exclude name=""/> -->
48 </fileset>
49
50 <copy todir="${builddir}/webservice">
51 <fileset refid="filesWebservice"/>
52 </copy>
[f03591a]53 <copy todir="${builddir}/webservice/maps">
[6f38643]54 <fileset refid="filesWebserviceMaps"/>
55 </copy>
[e82ce68]56 </target>
[2fa2ef8]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>
[e82ce68]77
78 <fileset dir="${builddir}" id="filesWebApp"/>
79
80
[2fa2ef8]81 <target name="dist" depends="buildwebservice,buildwebclient,buildwebserver,test">
[e82ce68]82 <echo msg="Creating archive"/>
[008bce9]83 <tar destfile="${builddir}/..//gnuboat-webapp.tar.gz" compression="gzip">
[e82ce68]84 <fileset refid="filesWebApp"/>
[008bce9]85 </tar>
[c455d7b]86 <echo msg="Files copied and compressed in build directory weblcient.tar.gz OK!" />
[e82ce68]87 </target>
[008bce9]88
[2fa2ef8]89 <target name="testdist" depends="buildwebservice,buildwebclient,buildwebserver,test">
[e82ce68]90 <echo msg="Install project into ${user.home}/public_html/gnuboat"/>
[a50c18f]91 <fileset id="filesConfig" dir="./webservice/config">
[008bce9]92 <include name="config.php"/>
93 </fileset>
[a50c18f]94 <fileset id="filesLogs" dir="./webservice/tests/logs">
[008bce9]95 <include name="*.log"/>
96 </fileset>
97
[e82ce68]98 <copy todir="${user.home}/public_html/gnuboat">
99 <fileset refid="filesWebApp"/>
100 </copy>
[a50c18f]101 <copy todir="${user.home}/public_html/gnuboat/webservice/tests/logs">
[008bce9]102 <fileset refid="filesLogs"/>
103 </copy>
104 <copy todir="${user.home}/public_html/gnuboat/webservice/config">
105 <fileset refid="filesConfig"/>
106 </copy>
[e82ce68]107 </target>
[3c9166b]108
[86442cb]109 <target name="test">
[c0e66e6]110 <exec command="php phpunit-7.4.3.phar" passthru="true" checkreturn="true"/>
[0662b2d]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"/> -->
[008bce9]113 <!--<formatter type="JUnit" usefile="true"/>-->
[0662b2d]114<!-- <batchtest>
[86442cb]115 <fileset dir="webservice">
116 <include name="tests/*Test.php"/>
117 </fileset>
118 </batchtest>
[0662b2d]119 </phpunit>-->
[86442cb]120 </target>
[3c9166b]121
[573626d]122 <target name="testdist-sample-logs" depends="testdist">
[3c9166b]123 <echo msg="Install sample logs"/>
[573626d]124 <fileset id="filesSampleLogs" dir="../../sample-logs">
[3c9166b]125 <include name="*.log"/>
126 </fileset>
[573626d]127 <fileset id="filesCalcLogs" dir="../../sample-logs/calc-demo">
[3c9166b]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>
[e82ce68]135</project>
Note: See TracBrowser for help on using the repository browser.