Changeset 7131


Ignore:
Timestamp:
10/31/06 19:40:06 (5 years ago)
Author:
anp
Message:

intégration des fct de migration à la création des builderPack

Location:
trunk/Bui_Core
Files:
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bui_Core/properties.xml

    r7099 r7131  
    44          <classpath> 
    55                <pathelement location="${libjava}/ant/ant-contrib.jar"/> 
     6          </classpath> 
     7        </taskdef> 
     8        <!-- xmltask --> 
     9        <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"> 
     10          <classpath> 
     11                <pathelement location="${libjava}/ant/xmltask.jar"/> 
    612          </classpath> 
    713        </taskdef> 
  • trunk/Bui_Core/resources/models/generatePackages.xsl

    r6956 r7131  
    77        <xsl:param name="destpath"/> 
    88        <xsl:param name="extensionPack"/> 
     9        <xsl:param name="tmpDir"/> 
    910        <!-- liste des définitions des packages potentiellement utilisables --> 
    1011        <xsl:variable name="gListPackages" select="document($packageListFile)"/> 
     
    164165                        <xsl:choose><!-- par défaut, version du pack = version spécifiée dans description.xml --> 
    165166                                <xsl:when test="string-length(normalize-space($gListPackages/packages/editionSheet[@id=$vPackageCode]/description/@currentVersion))&gt;0"><xsl:value-of select="$gListPackages/packages/editionSheet[@id=$vPackageCode]/description/@currentVersion"/></xsl:when> 
     167                                <xsl:when test="string-length(normalize-space(description/@currentVersion))&gt;0"><xsl:value-of select="description/@currentVersion"/></xsl:when> 
    166168                                <xsl:otherwise><xsl:value-of select="/*/version"/></xsl:otherwise> 
    167169                        </xsl:choose> 
     
    169171                <!-- # Target de création du .jar de maj du pack (wspType/wspOption)--> 
    170172                <target name="{concat('pack_',$vPackageCode)}"> 
    171                         <xsl:choose> 
    172                                 <xsl:when test="@ref"><!-- référence à un editionSheet défini dans un autre fichier --> 
    173                                         <property name="vVersion" value="{$vVersion}"/> 
    174                                         <xsl:variable name="vPackPath"> 
     173                        <property name="vVersion" value="{$vVersion}"/> 
     174                        <xsl:variable name="vPackPath"> 
     175                                <xsl:choose> 
     176                                        <xsl:when test="@ref"> 
    175177                                                <xsl:choose> 
    176178                                                        <xsl:when test="$gListPackages/packages/editionSheet[@id=$vPackageCode]/pack/@virtualProjectRefId"><!-- mode projet virtuel --> 
     
    179181                                                        <xsl:otherwise><xsl:value-of select="$gListPackages/packages/editionSheet[@id=$vPackageCode]/pack/@path"/></xsl:otherwise> 
    180182                                                </xsl:choose> 
    181                                         </xsl:variable> 
    182                                         <property name="vPackPath" value="{normalize-space($vPackPath)}"/> 
    183                                 </xsl:when> 
    184                                 <xsl:otherwise><!-- editionSheet défini directement --> 
    185                                         <property name="vVersion" value="{description/@currentVersion}"/> 
    186                                         <xsl:variable name="vPackPath"> 
     183                                        </xsl:when> 
     184                                        <xsl:otherwise> 
    187185                                                <xsl:choose> 
    188186                                                        <xsl:when test="pack/@virtualProjectRefId"><!-- mode projet virtuel --> 
     
    191189                                                        <xsl:otherwise><xsl:value-of select="pack/@path"/></xsl:otherwise> 
    192190                                                </xsl:choose> 
    193                                         </xsl:variable> 
    194                                         <property name="vPackPath" value="{normalize-space($vPackPath)}"/> 
    195                                 </xsl:otherwise> 
    196                         </xsl:choose> 
    197                         <property name="vId" value="{concat('pack_',$vPackageCode)}"/> 
    198                         <property name="vJarPath" value="${{destModelDir}}/${{vId}}_${{vVersion}}.jar"/> 
    199                         <!-- Création du .jar pour le systeme de maj --> 
    200                         <zip destfile="${{vJarPath}}" compress="yes"> 
    201                                 <zipfileset file="${{vPackPath}}" fullpath="wsptype.xml"/> 
    202                                 <!-- TODO : mettre à ce niveau les différents répertoires de migration --> 
    203                         </zip> 
    204                         <!--<replaceregexp file="${{vFilePath}}" match="&lt;wspUpdate " replace="&lt;wspUpdate currentVersion='${{vVersion}}' " byline="true"/> a priori inutile --> 
    205                         <!-- Création de l'installeur --> 
    206                         <ant target="xCreateScInstaller" antfile="${{antBuildModelFile}}"/> 
    207                 </target> 
     191                                        </xsl:otherwise> 
     192                                </xsl:choose> 
     193                        </xsl:variable> 
     194                        <property name="vPackPath" value="{normalize-space($vPackPath)}"/> 
     195                         
     196                        <xsl:variable name="vMigrationPath"> 
     197                                <xsl:choose> 
     198                                        <xsl:when test="@ref"> 
     199                                                <xsl:choose> 
     200                                                        <xsl:when test="$gListPackages/packages/editionSheet[@id=$vPackageCode]/pack/migration/@virtualProjectRefId"><!-- mode projet virtuel --> 
     201                                                                ${<xsl:value-of select="$gListPackages/packages/editionSheet[@id=$vPackageCode]/pack/migration/@virtualProjectRefId"/>.path}/<xsl:value-of select="$gListPackages/packages/editionSheet[@id=$vPackageCode]/pack/migration/@path"/> 
     202                                                        </xsl:when> 
     203                                                        <xsl:otherwise><xsl:value-of select="$gListPackages/packages/editionSheet[@id=$vPackageCode]/pack/migration/@path"/></xsl:otherwise> 
     204                                                </xsl:choose> 
     205                                        </xsl:when> 
     206                                        <xsl:otherwise> 
     207                                                <xsl:choose> 
     208                                                        <xsl:when test="pack/migration/@virtualProjectRefId"><!-- mode projet virtuel --> 
     209                                                                ${<xsl:value-of select="pack/migration/@virtualProjectRefId"/>.path}/<xsl:value-of select="pack/migration/@path"/> 
     210                                                        </xsl:when> 
     211                                                        <xsl:otherwise><xsl:value-of select="pack/migration/@path"/></xsl:otherwise> 
     212                                                </xsl:choose> 
     213                                        </xsl:otherwise> 
     214                                </xsl:choose> 
     215                        </xsl:variable> 
     216                        <property name="vMigrationPath" value="{normalize-space($vMigrationPath)}"/> 
     217                         
     218                        <xsl:if test="string-length(normalize-space($vPackPath))&gt;0"> 
     219                                <xmltask source="${{vPackPath}}"> 
     220                                        <call path="/*/*[@uri]" buffer="vContent"> 
     221                                          <param name="vUri" path="@uri"/> 
     222                                          <actions> 
     223                                                <property name="@{{vUri}}.vId" value="pack_@{{vUri}}"/> 
     224                                                <property name="@{{vUri}}.vJarPath" value="${{destModelDir}}/${{@{{vUri}}.vId}}_${{vVersion}}.jar"/> 
     225                                                <!-- Création du .jar pour le systeme de maj --> 
     226                                                <property name="@{{vUri}}.vUriTmpDir" value="{$tmpDir}/${{@{{vUri}}.vId}}"/> 
     227                                                <mkdir dir="${{@{{vUri}}.vUriTmpDir}}"/> 
     228                                                <xmltask sourcebuffer="vContent" dest="${{@{{vUri}}.vUriTmpDir}}/wsptype.xml"/> 
     229                                                <copy todir="${{@{{vUri}}.vUriTmpDir}}" failonerror="false"> 
     230                                                        <fileset dir="${{vMigrationPath}}/@{{vUri}}" includes="**/**"/> 
     231                                                </copy> 
     232                                                <zip destfile="${{@{{vUri}}.vJarPath}}" compress="yes"> 
     233                                                        <zipfileset dir="${{@{{vUri}}.vUriTmpDir}}"/> 
     234                                                </zip> 
     235                                                <!-- Création de l'installeur --> 
     236                                                <ant target="xCreateScInstaller" antfile="${{antBuildModelFile}}"> 
     237                                                        <property name="vJarPath" value="${{@{{vUri}}.vJarPath}}"/> 
     238                                                        <property name="vId" value="${{@{{vUri}}.vId}}"/> 
     239                                                </ant> 
     240                                          </actions> 
     241                                        </call> 
     242                                </xmltask> 
     243                        </xsl:if> 
     244                </target> 
     245 
    208246                <!-- # Target de création du XPI --> 
    209247                <target name="{concat('tg_',$vPackageCode)}"> 
  • trunk/Bui_Core/xBuildModel.xml

    r6958 r7131  
    6363                <property name="tmpDir" value="${basedir}/tmp.genModels"/> 
    6464                <property name="vAntFile" value="${tmpDir}/build.xml"/> 
    65                 <property name="destapprootdir" value="${baseDirDestModel}/${modelName}"/> 
     65                <property name="destapprootdir" value="${baseDirDestModel}/${model(name)}"/> 
    6666                <property name="destpath" value=" "/> 
    6767                <delete failonerror="false" dir="${tmpDir}"/> 
     
    7777                  <param name="extensionPack" expression="${extensionPack}"/> 
    7878                  <param name="destpath" expression="${destpath}"/> 
     79                  <param name="tmpDir" expression="${tmpDir}"/> 
    7980                </xslt> 
    8081                <!-- # execution du ant pour créer les packages --> 
Note: See TracChangeset for help on using the changeset viewer.