source: versions/3.5.201/Bui_Core/xBuildServer.xml @ 11404

Revision 11404, 17.0 KB checked in by anp, 4 years ago (diff)

debug, cleanUp

Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!--
3 * LICENCE[[
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1/CeCILL 2.O
5 *
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is utc.fr code.
16 *
17 * The Initial Developer of the Original Code is
18 * Universite de Technologie de Compiegne.
19 *
20 * Portions created by the Initial Developer are Copyright (C) 2005
21 * the Initial Developer. All Rights Reserved.
22 *
23 * Contributor(s):
24 *
25 *
26 * Alternatively, the contents of this file may be used under the terms of
27 * either of the GNU General Public License Version 2 or later (the "GPL"),
28 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
29 * or the CeCILL Licence Version 2.0 (http://www.cecill.info/licences.en.html),
30 * in which case the provisions of the GPL, the LGPL or the CeCILL are applicable
31 * instead of those above. If you wish to allow use of your version of this file
32 * only under the terms of either the GPL or the LGPL, and not to allow others
33 * to use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL, the LGPL or the CeCILL.
38 * ]]LICENCE
39  -->
40
41<project name="Bui_server" default="generateLicenceFiles" basedir=".">
42        <!--**
43                *  Copie des différents éléments permettant d'intégrer la couche serveur à un client SC
44                *       Properties à déclarer :
45                *               - destserverdir
46                *               - destappbindir
47                **-->
48        <!-- destinations -->
49        <property name="destjredir" value="${destserverdir}/jre"/>
50        <property name="destjardir" value="${destserverdir}/sclib"/>    <!-- Dossier de destination des JARS à créer -->
51        <property name="destnativdir" value="${destserverdir}/nativlib"/>       <!-- Dossier de destination des DLL, exe utilisées par les JAR -->
52        <property name="destlibext" value="${destserverdir}/javalib"/>  <!-- Dossier de destination des librairies externes -->
53        <property name="destlibendorsed" value="${destjredir}/lib/endorsed"/>   <!-- Dossier de destination des librairies endorsed de la JVM -->
54        <property name="destconfdir" value="${destserverdir}/conf"/>
55        <property name="ssofssdir" value="${destserverdir}/ssofss"/>
56        <!--<property name="jarprefix" value="scenari"/>--><!-- Préfixes des JARS à créer -->
57        <!-- Emplacement des sources -->
58        <property name="coreresourcesdir" value="${coredir}\resources"/>
59        <property name="coreserverconfdir" value="${coreresourcesdir}\confServer"/>
60        <property name="coreupdtmgrconfdir" value="${coreresourcesdir}\updtMgr"/>
61        <!-- variables diverses -->
62        <property name="txtLicenceXsl" value="${coreresourcesdir}/server/generateTxtLicenceFile.xsl"/>
63        <property name="htmlLicenceXsl" value="${coreresourcesdir}/server/generateHtmlLicenceFile.xsl"/>
64        <property name="devprojectdir" value="${basedir}/XXXXXXX"/><!-- note : path vers un dossier inexistant. Permet de surcharger cette variable dans les build des Jav_* et ainsi permettre des compiles se basant sur les jar précédemment générés et non sur les .class des différents projets du workspace eclipse.-->
65               
66        <import file="${wspdir}/Bui_Core/toolkit/xScriptdefs.xml"/>
67        <!--**
68                *  fichiers d'initialisation
69                **-->   
70        <target name="copyServerInit" description="copie des fichiers d'initialisation du server">
71                <!--
72                        A déclarer ds l'appelant:
73                                - pServerConfDir : répertoire source des fichiers de config
74                                - destconfdir : répertoire source des fichiers de config
75                                - app.name
76                                - app.name(shortName)
77                                - app.publisher
78                                - app.profile(name)
79                -->
80                <echo message="copie des fichiers d'initialisation du server"/>
81                <property name="app.dynFileExtension" value=""/><!-- utilisé par scKit-->
82                <copy todir="${destconfdir}">
83                        <fileset dir="${pServerConfDir}" casesensitive="yes">
84                                <include name="**/*"/>
85                        </fileset>
86                </copy>
87                <copy file="${wspdir}/Jav_Main/initCommon.xml" tofile="${destconfdir}/initCommon.xml"/>
88                <copy file="${wspdir}/Jav_Main/initCommonServices.xml" tofile="${destconfdir}/initCommonServices.xml"/>
89                <copy file="${wspdir}/Jav_Main/initCommonUnivers.xml" tofile="${destconfdir}/initCommonUnivers.xml"/>
90                <!-- copie des properties utlisées dans les init* -->
91                <copy todir="${destconfdir}" >
92                        <fileset dir="${wspdir}/Jav_Main">
93                                <include name="properties/**/**"/>
94                        </fileset>
95                </copy>
96               
97                <!-- Remplacements OS dependant -->
98                <if>
99                        <!-- # lin -->
100                        <equals arg1="${app.os}" arg2="lin"/>
101                        <then>
102                                <replaceregexp match="##app.name##" replace="#lc#begin#${app.name}#lc#end#" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
103                                <replaceregexp match="##app.name\(noLowercase\)##" replace="${app.name}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
104                                <replaceregexp match="##app.publisher##" replace="#lc#begin#${app.publisher}#lc#end#" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
105                                <!-- mise en minuscule du texte "${app.publisher}" compris entre #lc#begin# et #lc#end#-->
106                                <strConvert property="app.publisher"/>
107                                <replaceregexp match="#lc#begin#${app.publisher}([A-Za-z1-9]*)#lc#end#" replace="${app.publisher.lower}\1" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
108                        </then>
109                        <!-- # Other OS -->
110                        <else>
111                                <replaceregexp match="##app.name##" replace="${app.name}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
112                                <replaceregexp match="##app.publisher##" replace="${app.publisher}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
113                        </else>
114                </if>
115                <!-- Remplacements multi OS -->
116                <replaceregexp match="##app.server\(port\)##" replace="${app.server(port)}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
117                <replaceregexp match="##app.profile\(name\)##" replace="${app.profile(name)}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
118                <replaceregexp match="##app.name\(shortName\)##" replace="${app.name(shortName)}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
119                <replaceregexp match="##app.version##" replace="${app.version}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
120                <replaceregexp match="##app.version\(major\)##" replace="${app.version(major)}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
121                <replaceregexp match="##app.version\(medium\)##" replace="${app.version(medium)}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
122                <replaceregexp match="##app.version\(minor\)##" replace="${app.version(minor)}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
123                <replaceregexp match="##app.server.urlpublication##" replace="${app.server.urlpublication}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
124                <replaceregexp match="##app.server\(univers\)##" replace="${app.server(univers)}" byline="yes" flags="g"><fileset dir="${destconfdir}" includes="*.xml,*${app.dynFileExtension}"/></replaceregexp>
125        </target>
126       
127<!--**
128        *  fichiers de l'updtMgr
129        **-->   
130        <target name="copyUpdtMgr" description="copie des fichiers de updtMgr (delocalizedRes.properties)">
131                <!--
132                        A déclarer ds l'appelant:
133                                - (pCopyUpdtMgrConfDir : répertoire source des fichiers de updtMgr) optionnel : peut etre surchargé dans l'appelant
134                                - destserverdir : répertoire de copie des ces fichiers (scServer)
135                -->
136                <property name="pCopyUpdtMgrConfDir" value="${coreupdtmgrconfdir}"/><!-- si pas définie dns l'appelant -->
137                <echo message="copie des fichiers de updtMgr"/>
138                <copy todir="${destserverdir}/updt">
139                        <fileset dir="${pCopyUpdtMgrConfDir}" casesensitive="yes">
140                                <include name="**/*"/>
141                        </fileset>
142                </copy>
143        </target>
144       
145        <target name="generateLicenceFiles" description="Génération du fichier des licences">
146                <!--
147                        A déclarer ds l'appelant:
148                                - pDestPath : répertoire ou seront crés les fichiers de licence
149                                - tmpRep    : repertoire temporaire
150                                - app.licence, app.name, app.sources(url)
151                -->
152                <ant target="generateLicenceFiles.app"/>
153                <ant target="generateLicenceFiles.thirdParty"/>
154        </target>
155       
156        <target name="generateLicenceFiles.app" description="Génération du fichier des licences de l'application">
157                <!-- licence de l'appli-->
158                <echo message="copie des fichiers de licence, ..."/>
159                <concat destfile="${pDestPath}/${license.app.filename}">${app.licence}</concat>
160                <replaceregexp file="${pDestPath}/${license.app.filename}" match="##app.name##" replace="${app.name}" byline="yes"/>
161                <replaceregexp file="${pDestPath}/${license.app.filename}" match="##app.profile\(name\)##" replace="${app.profile(name)}" byline="yes"/>
162                <replaceregexp file="${pDestPath}/${license.app.filename}" match="##app.sources##" replace="${app.sources(url)}" byline="yes"/>
163        </target>
164       
165        <target name="generateLicenceFiles.thirdParty" description="Génération du fichier des licences tierces">
166                <!-- tierces licences -->
167                <echo message="création des fichiers de licences tierces"/>
168                <property name="vAppsListFile" value="${tmpRep}/appList.xml"/>
169                <concat destfile="${vAppsListFile}"><![CDATA[<apps>]]></concat>
170                <concat destfile="${vAppsListFile}" append="true">
171                        <fileset dir="${wspdir}/Lib_XulRunner" includes="about.xml"/>
172                        <fileset dir="${coreresourcesdir}/xulRunner" includes="**/about.xml"/>
173                        <fileset dir="${wspdir}/Bui_Localization/${app.localization(target)}" includes="**/about.xml"/>
174                        <fileset dir="${wspdir}/Lib_JRE" includes="about_jre.xml"/>
175                        <fileset dir="${wspdir}/Lib_JRE" includes="about_thirdParty.xml"/>
176                        <fileset dir="${wspdir}/Res_Ant" includes="about.xml"/>
177                        <fileset dir="${wspdir}/Res_Ant" includes="about.antcontrib.xml"/>
178                        <fileset dir="${wspdir}/Res_Ant" includes="about.xmltask.xml"/>
179                        <fileset dir="${wspdir}/Res_Ftp" includes="about.xml"/>
180                        <!-- <fileset dir="${libjavadir}/batik" includes="about.xml"/> -->
181                        <fileset dir="${libjavadir}/beanShell" includes="about.xml"/>
182                        <fileset dir="${libjavadir}/apache.commons">
183                                <include name="about_fileupload.xml"/>
184                                <!--<include name="about_jexsl.xml"/>-->
185                                <!--<include name="about_beanutils.xml"/>-->
186                                <!--<include name="about_logging.xml"/>-->
187                                <!--<include name="about_collections.xml"/>-->
188                                <!--<include name="about_grant.xml"/>-->
189                        </fileset>
190                        <fileset dir="${libjavadir}/webmacro" includes="about.xml"/>
191                        <fileset dir="${wspdir}/Res_ScXmlParser" includes="about.xml"/>
192                        <fileset dir="${wspdir}/Res_ScXmlSerializer" includes="about.xml"/>
193                        <fileset dir="${wspdir}/Res_Jing" includes="about.xml"/>
194                        <fileset dir="${wspdir}/Res_ScXslt" includes="about.xml"/>
195                        <fileset dir="${wspdir}/Res_Bsf" includes="about.xml"/>
196                        <fileset dir="${libjavadir}/jai" includes="about.xml"/>
197                        <fileset dir="${libjavadir}/servlet" includes="about.xml"/>
198                        <fileset dir="${libjavadir}/oo" includes="about.xml"/>
199                        <fileset dir="${libjavadir}/imagemagick" includes="about.xml"/>
200                        <fileset dir="${libjavadir}/lame" includes="about.xml"/>
201                        <fileset dir="${libjavadir}/sox" includes="about.xml"/>
202                        <fileset dir="${libjavadir}/oro" includes="about.xml"/>
203                </concat>
204                <concat destfile="${vAppsListFile}" append="true"><![CDATA[</apps>]]></concat>
205                <xslt in="${vAppsListFile}" out="${pDestPath}/${license.thirdParty.filename}" style="${txtLicenceXsl}">
206                  <outputproperty name="method" value="text"/>
207                </xslt>
208                <xslt in="${vAppsListFile}" out="${pDestPath}/${license.thirdParty.html.filename}" style="${htmlLicenceXsl}">
209                  <outputproperty name="method" value="html"/>
210                </xslt>
211        </target>
212       
213        <target name="generateLicenceFiles.thirdParty.client" description="Génération du fichier des licences tierces clientes uniquement">
214                <!-- tierces licences -->
215                <echo message="création des fichiers de licences tierces"/>
216                <property name="vAppsListFile" value="${tmpRep}/appList.xml"/>
217                <concat destfile="${vAppsListFile}"><![CDATA[<apps>]]></concat>
218                <concat destfile="${vAppsListFile}" append="true">
219                        <fileset dir="${wspdir}/Lib_XulRunner" includes="about.xml"/>
220                        <fileset dir="${coreresourcesdir}/xulRunner" includes="**/about.xml"/>
221                        <fileset dir="${wspdir}/Bui_Localization/${app.localization(target)}" includes="**/about.xml"/>
222                </concat>
223                <concat destfile="${vAppsListFile}" append="true"><![CDATA[</apps>]]></concat>
224                <xslt in="${vAppsListFile}" out="${pDestPath}/${license.thirdParty.filename}" style="${txtLicenceXsl}">
225                  <outputproperty name="method" value="text"/>
226                </xslt>
227                <xslt in="${vAppsListFile}" out="${pDestPath}/${license.thirdParty.html.filename}" style="${htmlLicenceXsl}">
228                  <outputproperty name="method" value="html"/>
229                </xslt>
230        </target>
231               
232<!--**
233         *  nativlib
234         * NOTE : penser à déclarer les licences liées à toute nouvelle librairie dans generateLicenceFiles
235         **--> 
236        <target name="xCopyNativLib">
237                <!-- @param : destnativdir, app.os
238                        -->
239                <echo message="Copie des librairies de xCopyNativLib"/>
240                <copy todir="${destnativdir}" failonerror="no">
241                        <fileset dir="${wspdir}/Lib_Java/lame/${app.os}">
242                                <include name="**/**"/>
243                        </fileset>
244                        <fileset dir="${wspdir}/Lib_Java/sox/${app.os}">
245                                <include name="**/**"/>
246                        </fileset>
247                        <fileset dir="${wspdir}/Lib_Java/imagemagick/${app.os}">
248                                <include name="**/**"/>
249                        </fileset>
250                </copy>
251        </target>
252       
253        <!--**
254                 *  Jar xpcom
255                 **-->
256        <target name="xJarXulImage" description="Compile le xpcom java xulImage"><!-- ATTENTION : penser à déclarer le jar dans le service schttpdataserver.js -->
257                <echo message="Building XPCom Xul_Image ..."/>
258                <ant dir="${wspdir}/Xul_Image/_java" target="append"><!-- ts les jar issus des xpcom sont ajoutés dans le meme jar : ${jarprefix}_XPComs.jar -->
259                        <property name="XPCom_image.jarpath" value="${destjardir}/${jarprefix}_XPComs.jar"/>
260                </ant>
261        </target>
262       
263        <!--**
264                 *  Jar SCENARI
265                 **-->
266        <target name="xJarEXT">
267                <echo message="Building Jar Jav_EXT ..."/>
268                <ant dir="${wspdir}/Jav_EXT" target="all"/>
269        </target>
270        <target name="xJarUPDT">
271                <echo message="Building Jar Jav_UPDT ..."/>
272                <ant dir="${wspdir}/Jav_Updt" target="all"/>
273        </target>
274        <target name="xJarFW">
275                <echo message="Building Jar Jav_FW ..."/>
276                <ant dir="${wspdir}/Jav_FW" target="all"/>
277        </target>
278        <target name="xJarCO">
279                <echo message="Building Jar Jav_CO ..."/>
280                <ant dir="${wspdir}/Jav_CO" target="all"/>
281        </target>
282        <target name="xJarEL">
283                <echo message="Building Jar Jav_EL ..."/>
284                <ant dir="${wspdir}/Jav_EL" target="all"/>
285        </target>
286        <target name="xJarLDAP">
287                <echo message="Building Jar Jav_LDAP ..."/>
288                <ant dir="${wspdir}/Jav_UserLdap" target="all"/>
289        </target>
290        <target name="xJarGE">
291                <echo message="Building Jar Jav_GE ..."/>
292                <ant dir="${wspdir}/Jav_GE" target="all"/>
293        </target>
294        <target name="xJarBDP">
295                <echo message="Building Jar Jav_BDP ..."/>
296                <ant dir="${wspdir}/Jav_BDP" target="all"/>
297        </target>
298        <target name="xJarBDP_FS">
299                <echo message="Building Jar Jav_BDP_FS ..."/>
300                <ant dir="${wspdir}/Jav_BDP_FS" target="all"/>
301        </target>
302        <target name="xJarAudio">
303                <echo message="Building Jar Audio ..."/>
304                <ant dir="${wspdir}/Jav_Audio" target="all"/>
305        </target>
306        <target name="xJarIhmMoz">
307                <echo message="Building Jar Jav_IhmMoz ..."/>
308                <ant dir="${wspdir}/Jav_IhmMoz" target="compileJarIhmMoz"/>
309        </target>
310        <target name="xJarClient">
311                <echo message="Building Jar Jav_Main ..."/>
312                <ant dir="${wspdir}/Jav_Main" target="compileJarClient"/>
313        </target>
314        <target name="xJarServletEngine">
315                <echo message="Building Jar ServletEngine ..."/>
316                <ant dir="${wspdir}/Jav_ServletEngine" target="compileJarServletEngine"/>
317        </target>
318       
319        <!--**
320                 *  ss root
321                 **-->
322        <target name="xCopySsOfSs" description="Copie les Ss de Ss">
323                <!--
324                        @param : ssofssdir
325                        -->
326                <echo message="Creating ssofss directory ..."/>
327                <delete dir="${ssofssdir}"/>
328                <mkdir dir="${ssofssdir}"/>
329                <copy todir="${ssofssdir}">
330                        <fileset dir="${wspdir}/Jav_Main/ssofss" excludes="**/SVN/**"/>
331        </copy>
332        </target>
333</project>
Note: See TracBrowser for help on using the repository browser.