You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by vm...@apache.org on 2004/05/01 14:40:47 UTC

cvs commit: maven-plugins/multichanges plugin.jelly

vmassol     2004/05/01 05:40:47

  Modified:    multichanges plugin.jelly
  Log:
  speed up reactor using the new collectOnly
  
  Revision  Changes    Path
  1.3       +60 -48    maven-plugins/multichanges/plugin.jelly
  
  Index: plugin.jelly
  ===================================================================
  RCS file: /home/cvs/maven-plugins/multichanges/plugin.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- plugin.jelly	4 Mar 2004 18:36:33 -0000	1.2
  +++ plugin.jelly	1 May 2004 12:40:47 -0000	1.3
  @@ -1,4 +1,5 @@
   <?xml version="1.0"?>
  +
   <!-- 
   /*
    * Copyright 2001-2004 The Apache Software Foundation.
  @@ -17,7 +18,6 @@
    */
    -->
   
  -
   <project
     xmlns:j="jelly:core"
     xmlns:ant="jelly:ant"
  @@ -35,12 +35,14 @@
     -->
     <goal name="multichanges:report">
   
  +    <!-- Gather project list using the maven reactor -->
       <m:reactor
           basedir="${maven.multichanges.basedir}"
           banner="Gathering project list"
           includes="${maven.multichanges.includes}"
           excludes="${maven.multichanges.excludes}"
           postProcessing="true"
  +        collectOnly="true"
           ignoreFailures="${maven.multichanges.ignoreFailures}"/>
   
       <ant:dirname property="dataReportDir" file="${maven.multichanges.data}"/>
  @@ -48,53 +50,53 @@
   
       <j:file name="${maven.multichanges.data}" prettyPrint="true" 
           xmlns="release">
  -    <releases>
  -      <j:forEach var="reactorProject" items="${reactorProjects}">
  -         <x:element name="project">
  -           <x:attribute name="name">
  -             ${reactorProject.name}
  -           </x:attribute>
  -           <util:file var="changesAsFile" 
  -               name="${reactorProject.context.getVariable('maven.docs.src')}/changes.xml"/>
  -           <j:choose>
  -             <j:when test="${changesAsFile.exists()}">
  -               <x:parse var="doc" xml="${changesAsFile}"/>           
  -               <!-- Extract latest version. We assume it is contained in 
  -                    the first <release> tag found -->
  -               <!-- TODO: Improve algorithm by writing a java bean -->
  -               <x:set var="versionElems" 
  -                   select="$doc//release[contains(@date,'-')]"/>
  -               <j:choose>
  -                 <j:when test="${not(versionElems.isEmpty())}">
  -                   <x:attribute name="version">
  -                     ${versionElems.get(0).attributeValue('version')}
  -                   </x:attribute>
  -                   <x:attribute name="date">
  -                     ${versionElems.get(0).attributeValue('date')}
  -                   </x:attribute>
  -                 </j:when>
  -                 <j:otherwise>
  -                   <x:attribute name="version">
  -                     Not released
  -                   </x:attribute>
  -                   <x:attribute name="date">
  -                     Not released
  -                   </x:attribute>
  -                 </j:otherwise>
  -               </j:choose>
  -             </j:when>
  -             <j:otherwise>
  -               <x:attribute name="version">
  -                 No information available
  -               </x:attribute>
  -               <x:attribute name="date">
  -                 No information available
  -               </x:attribute>
  -             </j:otherwise>
  -           </j:choose>
  -         </x:element>
  -       </j:forEach>
  -     </releases>
  +      <releases>
  +        <j:forEach var="reactorProject" items="${reactorProjects}">
  +          <x:element name="project">
  +            <x:attribute name="name">
  +              ${reactorProject.name}
  +            </x:attribute>
  +            <util:file var="changesAsFile" 
  +                name="${reactorProject.context.getVariable('maven.docs.src')}/changes.xml"/>
  +            <j:choose>
  +              <j:when test="${changesAsFile.exists()}">
  +                <x:parse var="doc" xml="${changesAsFile}"/>           
  +                <!-- Extract latest version. We assume it is contained in 
  +                     the first <release> tag found -->
  +                <!-- TODO: Improve algorithm by writing a java bean -->
  +                <x:set var="versionElems" 
  +                    select="$doc//release[contains(@date,'-')]"/>
  +                <j:choose>
  +                  <j:when test="${not(versionElems.isEmpty())}">
  +                    <x:attribute name="version">
  +                      ${versionElems.get(0).attributeValue('version')}
  +                    </x:attribute>
  +                    <x:attribute name="date">
  +                      ${versionElems.get(0).attributeValue('date')}
  +                    </x:attribute>
  +                  </j:when>
  +                  <j:otherwise>
  +                    <x:attribute name="version">
  +                      Not released
  +                    </x:attribute>
  +                    <x:attribute name="date">
  +                      Not released
  +                    </x:attribute>
  +                  </j:otherwise>
  +                </j:choose>
  +              </j:when>
  +              <j:otherwise>
  +                <x:attribute name="version">
  +                  No information available
  +                </x:attribute>
  +                <x:attribute name="date">
  +                  No information available
  +                </x:attribute>
  +              </j:otherwise>
  +            </j:choose>
  +          </x:element>
  +        </j:forEach>
  +      </releases>
       </j:file>
   
       <ant:dirname property="reportDir" file="${maven.multichanges.report}"/>
  @@ -109,6 +111,11 @@
   
     </goal>
   
  +  <!--
  +     ========================================================================
  +       Register the report to the xdoc plugin.
  +     ========================================================================
  +  -->
     <goal name="maven-multichanges-plugin:register">
       <doc:registerReport 
           name="Releases" 
  @@ -117,6 +124,11 @@
           description="Report on latest project releases."/>
     </goal>
     
  +  <!--
  +     ========================================================================
  +       Unregister the report to the xdoc plugin.
  +     ========================================================================
  +  -->
     <goal name="maven-multichanges-plugin:deregister">
       <doc:deregisterReport name="Releases"/>
     </goal>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org