vmassol     2004/06/12 07:11:13

  Modified:    abbot/src/plugin-resources jnlp.jsl
  Log:
  Binary --> Ascii
  
  Revision  Changes    Path
  1.2       +143 -143  maven-plugins/abbot/src/plugin-resources/jnlp.jsl
  
  Index: jnlp.jsl
  ===================================================================
  RCS file: /home/cvs/maven-plugins/abbot/src/plugin-resources/jnlp.jsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- jnlp.jsl  12 Jun 2004 14:10:25 -0000      1.1
  +++ jnlp.jsl  12 Jun 2004 14:11:13 -0000      1.2
  @@ -1,143 +1,143 @@
  -<?xml version="1.0"?>

  -

  -<!--

  -/* ====================================================================

  - *   Copyright 2004 The Apache Software Foundation.

  - *

  - *   Licensed under the Apache License, Version 2.0 (the "License");

  - *   you may not use this file except in compliance with the License.

  - *   You may obtain a copy of the License at

  - *

  - *       http://www.apache.org/licenses/LICENSE-2.0

  - *

  - *   Unless required by applicable law or agreed to in writing, software

  - *   distributed under the License is distributed on an "AS IS" BASIS,

  - *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

  - *   See the License for the specific language governing permissions and

  - *   limitations under the License.

  - * ====================================================================

  - */

  --->

  -

  -<jsl:stylesheet

  -     select="$doc"

  -  xmlns:j="jelly:core"

  -  xmlns:jsl="jelly:jsl"

  -  xmlns:x="jelly:xml"

  -  xmlns:u="jelly:util"

  -  xmlns:ant="jelly:ant"

  -  xmlns:doc="doc"

  -  xmlns="dummy"

  -  trim="true">

  -  

  -  <!-- Entry point (first matching template) -->

  -  <jsl:template match="/jnlp">

  -     <x:element name="jnlp">

  -             <x:attribute name="spec"> <x:expr select="@spec"/> </x:attribute>

  -             <x:attribute name="codebase"> <x:expr select="@codebase"/> 
</x:attribute>

  -             <jsl:applyTemplates select="//information"/>

  -             <jsl:applyTemplates select="//security"/>

  -             <jsl:applyTemplates select="//resources"/>

  -             <jsl:applyTemplates select="//application-desc"/>

  -     </x:element>

  -  </jsl:template>

  -  

  -  <!-- Copy information data "as-is" -->

  -  <jsl:template match="information">

  -    <x:copyOf select="."/>

  -  </jsl:template>

  -

  -  <!-- Copy security data "as-is" -->

  -  <jsl:template match="security">

  -    <x:copyOf select="."/>

  -  </jsl:template>

  -

  -  <!-- Transform jnlp resources -->         

  -  <jsl:template match="resources">

  -

  -    <resources>

  -      <!-- Copy j2se anchor -->

  -      <x:copyOf select="j2se"/>

  -                     

  -      <!-- Copy the former "main jar" reference, without main attribute -->

  -      <jsl:applyTemplates select="[EMAIL PROTECTED]"/>

  -                     

  -      <!-- Copy all the other jars references -->

  -      <x:copyOf select="jar[not(@main)]"/>

  -                     

  -      <!-- Add references to all jar in ${maven.abbot.webstart.dependencies} -->

  -      <j:forEach var="dep" items="${plugin.getDependencies()}">

  -        <j:if test="${dep.getProperty('abbot.webstart')}">

  -          <j:set var="filename" value="${dep.GroupId}-${dep.ArtifactId}"/>

  -          <j:if test="${maven.abbot.sign}">

  -            <x:element name="jar">

  -              <x:attribute 
name="href">file:${maven.abbot.dest.dir}/${filename}.jar</x:attribute>

  -            </x:element>

  -          </j:if>

  -          <j:if test="${maven.abbot.sign == false}">

  -            <x:element name="jar">

  -              <x:attribute name="href">${dep.getDependancyPath()}</x:attribute>

  -            </x:element>

  -          </j:if>    

  -         </j:if>  

  -       </j:forEach>

  -

  -      <!-- Add reference to the new "main jar" -->

  -      <x:element name="jar">

  -        <x:attribute name="main">true</x:attribute>

  -        <x:attribute 
name="href">file:${maven.abbot.dest.dir}/${maven.abbot.webstart.main.jar}</x:attribute>

  -      </x:element>

  -

  -      <!-- Copy all existing sys properties -->

  -      <x:copyOf select="property"/>

  -

  -      <!-- Add some other properties -->

  -      <x:element name="property">

  -        <x:attribute name="name">maven.abbot.src.dir</x:attribute>

  -        <x:attribute name="value">${maven.abbot.src.dir}</x:attribute>

  -      </x:element>

  -      <j:if test="${context.getVariable('maven.abbot.src.files') != null}">

  -        <x:element name="property">

  -          <x:attribute name="name">maven.abbot.src.files</x:attribute>

  -          <x:attribute name="value">${maven.abbot.src.files}</x:attribute>

  -        </x:element>

  -      </j:if>

  -      <x:element name="property">

  -        <x:attribute name="name">maven.abbot.reports.dir</x:attribute>

  -        <x:attribute name="value">${maven.abbot.reports.dir}</x:attribute>

  -      </x:element>

  -      <j:if test="${context.getVariable('maven.abbot.suite.name') != null}">

  -        <x:element name="property">

  -          <x:attribute name="name">maven.abbot.suite.name</x:attribute>

  -          <x:attribute name="value">${maven.abbot.suite.name}</x:attribute>

  -        </x:element>

  -      </j:if>

  -

  -      <!-- Add debug properties if debug mode is turned on -->

  -      <j:if test="${maven.abbot.debug}">

  -        <!-- Note: For some unknown reason, adding the "+TraceSecurity" option

  -             hangs Java Web Start (at least on 1.4.2_01) -->

  -        <property name="javaws.debug.0" value="+TraceCache"/>    

  -        <property name="javaws.debug.1" value="+TraceDiskCache"/>    

  -        <property name="javaws.debug.2" value="+TraceDownload"/>    

  -        <property name="javaws.debug.3" value="+TraceXMLParsing"/> 

  -      </j:if>

  -

  -    </resources>

  -

  -  </jsl:template>

  -

  -  <!-- Copy jar anchor without its main attribute -->

  -  <jsl:template match="[EMAIL PROTECTED]">

  -    <x:element name="jar">

  -      <x:attribute name="href"> <x:expr select="@href"/> </x:attribute>

  -    </x:element>

  -  </jsl:template>

  -

  -  <!-- Change the main class -->

  -  <jsl:template match="application-desc">

  -    <application-desc main-class="${maven.abbot.webstart.main.class}">

  -    </application-desc>      

  -  </jsl:template>     

  -

  -</jsl:stylesheet>

  +<?xml version="1.0"?>
  +
  +<!--
  +/* ====================================================================
  + *   Copyright 2004 The Apache Software Foundation.
  + *
  + *   Licensed under the Apache License, Version 2.0 (the "License");
  + *   you may not use this file except in compliance with the License.
  + *   You may obtain a copy of the License at
  + *
  + *       http://www.apache.org/licenses/LICENSE-2.0
  + *
  + *   Unless required by applicable law or agreed to in writing, software
  + *   distributed under the License is distributed on an "AS IS" BASIS,
  + *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + *   See the License for the specific language governing permissions and
  + *   limitations under the License.
  + * ====================================================================
  + */
  +-->
  +
  +<jsl:stylesheet
  +     select="$doc"
  +  xmlns:j="jelly:core"
  +  xmlns:jsl="jelly:jsl"
  +  xmlns:x="jelly:xml"
  +  xmlns:u="jelly:util"
  +  xmlns:ant="jelly:ant"
  +  xmlns:doc="doc"
  +  xmlns="dummy"
  +  trim="true">
  +  
  +  <!-- Entry point (first matching template) -->
  +  <jsl:template match="/jnlp">
  +     <x:element name="jnlp">
  +             <x:attribute name="spec"> <x:expr select="@spec"/> </x:attribute>
  +             <x:attribute name="codebase"> <x:expr select="@codebase"/> 
</x:attribute>
  +             <jsl:applyTemplates select="//information"/>
  +             <jsl:applyTemplates select="//security"/>
  +             <jsl:applyTemplates select="//resources"/>
  +             <jsl:applyTemplates select="//application-desc"/>
  +     </x:element>
  +  </jsl:template>
  +  
  +  <!-- Copy information data "as-is" -->
  +  <jsl:template match="information">
  +    <x:copyOf select="."/>
  +  </jsl:template>
  +
  +  <!-- Copy security data "as-is" -->
  +  <jsl:template match="security">
  +    <x:copyOf select="."/>
  +  </jsl:template>
  +
  +  <!-- Transform jnlp resources -->         
  +  <jsl:template match="resources">
  +
  +    <resources>
  +      <!-- Copy j2se anchor -->
  +      <x:copyOf select="j2se"/>
  +                     
  +      <!-- Copy the former "main jar" reference, without main attribute -->
  +      <jsl:applyTemplates select="[EMAIL PROTECTED]"/>
  +                     
  +      <!-- Copy all the other jars references -->
  +      <x:copyOf select="jar[not(@main)]"/>
  +                     
  +      <!-- Add references to all jar in ${maven.abbot.webstart.dependencies} -->
  +      <j:forEach var="dep" items="${plugin.getDependencies()}">
  +        <j:if test="${dep.getProperty('abbot.webstart')}">
  +          <j:set var="filename" value="${dep.GroupId}-${dep.ArtifactId}"/>
  +          <j:if test="${maven.abbot.sign}">
  +            <x:element name="jar">
  +              <x:attribute 
name="href">file:${maven.abbot.dest.dir}/${filename}.jar</x:attribute>
  +            </x:element>
  +          </j:if>
  +          <j:if test="${maven.abbot.sign == false}">
  +            <x:element name="jar">
  +              <x:attribute name="href">${dep.getDependancyPath()}</x:attribute>
  +            </x:element>
  +          </j:if>    
  +         </j:if>  
  +       </j:forEach>
  +
  +      <!-- Add reference to the new "main jar" -->
  +      <x:element name="jar">
  +        <x:attribute name="main">true</x:attribute>
  +        <x:attribute 
name="href">file:${maven.abbot.dest.dir}/${maven.abbot.webstart.main.jar}</x:attribute>
  +      </x:element>
  +
  +      <!-- Copy all existing sys properties -->
  +      <x:copyOf select="property"/>
  +
  +      <!-- Add some other properties -->
  +      <x:element name="property">
  +        <x:attribute name="name">maven.abbot.src.dir</x:attribute>
  +        <x:attribute name="value">${maven.abbot.src.dir}</x:attribute>
  +      </x:element>
  +      <j:if test="${context.getVariable('maven.abbot.src.files') != null}">
  +        <x:element name="property">
  +          <x:attribute name="name">maven.abbot.src.files</x:attribute>
  +          <x:attribute name="value">${maven.abbot.src.files}</x:attribute>
  +        </x:element>
  +      </j:if>
  +      <x:element name="property">
  +        <x:attribute name="name">maven.abbot.reports.dir</x:attribute>
  +        <x:attribute name="value">${maven.abbot.reports.dir}</x:attribute>
  +      </x:element>
  +      <j:if test="${context.getVariable('maven.abbot.suite.name') != null}">
  +        <x:element name="property">
  +          <x:attribute name="name">maven.abbot.suite.name</x:attribute>
  +          <x:attribute name="value">${maven.abbot.suite.name}</x:attribute>
  +        </x:element>
  +      </j:if>
  +
  +      <!-- Add debug properties if debug mode is turned on -->
  +      <j:if test="${maven.abbot.debug}">
  +        <!-- Note: For some unknown reason, adding the "+TraceSecurity" option
  +             hangs Java Web Start (at least on 1.4.2_01) -->
  +        <property name="javaws.debug.0" value="+TraceCache"/>    
  +        <property name="javaws.debug.1" value="+TraceDiskCache"/>    
  +        <property name="javaws.debug.2" value="+TraceDownload"/>    
  +        <property name="javaws.debug.3" value="+TraceXMLParsing"/> 
  +      </j:if>
  +
  +    </resources>
  +
  +  </jsl:template>
  +
  +  <!-- Copy jar anchor without its main attribute -->
  +  <jsl:template match="[EMAIL PROTECTED]">
  +    <x:element name="jar">
  +      <x:attribute name="href"> <x:expr select="@href"/> </x:attribute>
  +    </x:element>
  +  </jsl:template>
  +
  +  <!-- Change the main class -->
  +  <jsl:template match="application-desc">
  +    <application-desc main-class="${maven.abbot.webstart.main.class}">
  +    </application-desc>      
  +  </jsl:template>     
  +
  +</jsl:stylesheet>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to