commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r354091 - /jakarta/commons/proper/commons-build/trunk/maven.xml
Date Mon, 05 Dec 2005 16:23:47 GMT
Author: mvdb
Date: Mon Dec  5 08:23:41 2005
New Revision: 354091

URL: http://svn.apache.org/viewcvs?rev=354091&view=rev
Log:
Automatically generate the contributors.xml with the new goal generate-contributors. By default
it is not enabled in the build and has to be run manually when you want the contributors page
updated.
Please remember that it overwrites the xdocs/contriburors.xml file.

Modified:
    jakarta/commons/proper/commons-build/trunk/maven.xml

Modified: jakarta/commons/proper/commons-build/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/commons-build/trunk/maven.xml?rev=354091&r1=354090&r2=354091&view=diff
==============================================================================
--- jakarta/commons/proper/commons-build/trunk/maven.xml (original)
+++ jakarta/commons/proper/commons-build/trunk/maven.xml Mon Dec  5 08:23:41 2005
@@ -169,7 +169,11 @@
       goals="site:generate"
       banner="Generating site for"
       ignoreFailures="true"
+      postProcessing="true"
     />
+      <!-- used to generate the contributors page -->
+      <!-- Commented out, feel free to uncomment it -->
+<!--      <attainGoal name="generate-contributors"/> -->
 
 	<attainGoal name="xdoc"/>
   </goal>
@@ -217,6 +221,44 @@
 
     <delete file="${maven.final.name}-site.tar.gz"/>
         
+  </goal>
+
+  <goal name="generate-contributors">
+    <!--
+         don't rerun the reactor if that has already been done.. 
+         Use pom:verify-version, since it runs quickly..
+   -->
+    <j:if test="${reactorProjects == null}">
+      <maven:reactor
+        basedir="${basedir}/.."
+        includes="*/project.xml"
+        excludes="commons-build/project.xml"
+        goals="pom:verify-version"
+        banner="Generating site for"
+        ignoreFailures="true"
+        postProcessing="true"
+      />
+    </j:if>
+
+    <!-- Gather all committer names and id's from the project poms and stuff them in a
treemap -->
+    <ant:echo>Start generating constributors.xml file</ant:echo>
+    <j:new className="java.util.TreeMap" var="committers"/>
+    <j:forEach var="reactorProject" items="${reactorProjects}">
+       <j:forEach var="developer" items="${reactorProject.developers}">
+          ${committers.put(developer.id, developer.name)}
+       </j:forEach>
+    </j:forEach>
+    <!-- output the xml parts and the committers to the contributors.xml file -->
+
+    <j:set var="contributorFile" value="xdocs/contributors.xml"/>
+    <util:loadText file="src/xdocs/contributorsstart.xml" var="cstart"/>
+    <util:loadText file="src/xdocs/contributorsend.xml" var="cend"/>
+    <j:forEach var="committer" items="${committers}">
+       <j:set var="ctext" value="${ctext}&lt;li&gt;${committer.value} (${committer.key})&lt;/li&gt;"/>
+    </j:forEach>
+    <j:file escapeText="false" name="${contributorFile}" omitXmlDeclaration="true">
+       ${cstart}${ctext}${cend}
+    </j:file>
   </goal>
 
 </project>



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


Mime
View raw message