vmassol     2004/08/17 06:54:11

  Modified:    abbot    plugin.jelly plugin.properties
               abbot/src/plugin-resources jnlp.jsl
  Log:
  Refactoring: all jars to include in the generated JNLP are now signed in the 
maven.abbot.dest.jar.dir and the JNLP generation logic scans all jars in this 
directory for inclusion
  
  Revision  Changes    Path
  1.5       +12 -7     maven-plugins/abbot/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/abbot/plugin.jelly,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- plugin.jelly      16 Aug 2004 10:41:22 -0000      1.4
  +++ plugin.jelly      17 Aug 2004 13:54:11 -0000      1.5
  @@ -131,7 +131,7 @@
       <!-- We make a jar with compiled main class -->
       <!-- TODO: create this as part of the plugin creation and not as part of
            its execution -->
  -     <jar destfile="${maven.abbot.dest.dir}/${maven.abbot.webstart.main.jar}" 
  +     <jar destfile="${maven.abbot.dest.jar.dir}/${maven.abbot.webstart.main.jar}" 
            basedir="${plugin.dir}" includes="**/*.class"/>
       
       <!-- Iterating through dependencies, and signing them if they're not up-to-date 
-->
  @@ -145,35 +145,39 @@
             
             <!-- Checking whether or not the dependency has to be signed -->
             <uptodate property="${varname}"
  -                srcfile="${plugin.getDependencyPath(dep.Id)}"
  -                targetfile="${maven.abbot.dest.dir}/${filename}.jar"/>
  +              srcfile="${plugin.getDependencyPath(dep.Id)}"
  +              targetfile="${maven.abbot.dest.dir}/${filename}.jar"/>
             
             <!-- Keeping this debug trace a while to ensure that the up-to-date 
feature is working properly -->
             <echo level="debug">${dep.id} is uptodate ? 
${context.getVariable(varname) == true}</echo>
             
  -          <!-- Signing the dependancy only if it is not up-to-date or forced-->
  +          <!-- Signing the dependency only if it is not up-to-date or forced -->
             <j:if test="${(context.getVariable(varname) != true)}">
               
               <!-- Unsigning -->
  -            <zip destfile="${maven.abbot.dest.dir}/${filename}.jar">
  +            <zip destfile="${maven.abbot.dest.jar.dir}/${filename}.jar">
                 <zipfileset src="${plugin.getDependencyPath(dep.id)}"
                     excludes="**/*.SF **/*.RSA **/*.DSA"/>
               </zip> 
               
               <!-- Signing -->
  -            <signjar jar="${maven.abbot.dest.dir}/${filename}.jar" 
  +            <signjar jar="${maven.abbot.dest.jar.dir}/${filename}.jar" 
                  keystore="${maven.abbot.sign.keystore}"
                  alias="${maven.abbot.sign.alias}" 
                  storepass="${maven.abbot.sign.storepass}"/>
             </j:if>
             
           </j:if>
  +
         </j:forEach>
  +
         <!-- Jar containing abbot main class is signed -->
  -      <signjar jar="${maven.abbot.dest.dir}/${maven.abbot.webstart.main.jar}" 
  +      <!-- TODO: Only sign it if not already done instead of everytime -->
  +      <signjar jar="${maven.abbot.dest.jar.dir}/${maven.abbot.webstart.main.jar}" 
           keystore="${maven.abbot.sign.keystore}"
           alias="${maven.abbot.sign.alias}" 
           storepass="${maven.abbot.sign.storepass}"/>
  +
        </j:if>
                
        
  @@ -299,6 +303,7 @@
        <mkdir dir="${maven.test.dest}"/>
       <mkdir dir="${maven.abbot.reports.dir}"/>
       <mkdir dir="${maven.abbot.dest.dir}"/>
  +    <mkdir dir="${maven.abbot.dest.jar.dir}"/>
   
     </goal>  
   
  
  
  
  1.2       +4 -0      maven-plugins/abbot/plugin.properties
  
  Index: plugin.properties
  ===================================================================
  RCS file: /home/cvs/maven-plugins/abbot/plugin.properties,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.properties 12 Jun 2004 14:09:36 -0000      1.1
  +++ plugin.properties 17 Aug 2004 13:54:11 -0000      1.2
  @@ -33,6 +33,10 @@
   # Location where the abbot plugin puts build files related to abbot
   maven.abbot.dest.dir = ${maven.build.dir}/abbot
   
  +# Location where the abbot plugin signs the jars to be added to the 
  +# generated JNLP file.
  +maven.abbot.dest.jar.dir = ${maven.abbot.dest.dir}/jars
  +
   # Location where abbot junit test results will be located
   maven.abbot.reports.dir = ${maven.build.dir}/abbot-reports
   
  
  
  
  1.3       +12 -21    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.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- jnlp.jsl  12 Jun 2004 14:11:13 -0000      1.2
  +++ jnlp.jsl  17 Aug 2004 13:54:11 -0000      1.3
  @@ -65,28 +65,19 @@
         <!-- 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>
  +      <!-- Add references to all jars found in the ${maven.abbot.dest.jar.dir} dir 
-->
  +      <ant:fileScanner var="scanner">
  +        <ant:fileset dir="${maven.abbot.dest.jar.dir}" includes="*.jar"/> 
  +      </ant:fileScanner>
  +      <j:forEach var="jar" items="${scanner.iterator()}">
  +        <x:element name="jar">
  +          <!-- Treat "main" jar differently -->
  +          <j:if test="${jar.name == 
context.getVariable('maven.abbot.webstart.main.jar')}">
  +            <x:attribute name="main">true</x:attribute>            
             </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>
  +          <x:attribute name="href">file:${jar.absolutePath}</x:attribute>
  +        </x:element>
  +      </j:forEach>
   
         <!-- Copy all existing sys properties -->
         <x:copyOf select="property"/>
  
  
  

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

Reply via email to