portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r225764 - /portals/jetspeed-2/trunk/maven.xml
Date Thu, 28 Jul 2005 13:03:59 GMT
Author: ate
Date: Thu Jul 28 06:03:49 2005
New Revision: 225764

URL: http://svn.apache.org/viewcvs?rev=225764&view=rev
Log:
Restoring allSite goal.
Its a modified version of the multiproject:site goal in which the subproject site goals are
executed
in a separate process with ant exec.
This way, much less memory is needed (900M+ when using the original reactor).

Modified:
    portals/jetspeed-2/trunk/maven.xml

Modified: portals/jetspeed-2/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/maven.xml?rev=225764&r1=225763&r2=225764&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/maven.xml (original)
+++ portals/jetspeed-2/trunk/maven.xml Thu Jul 28 06:03:49 2005
@@ -95,15 +95,51 @@
             banner="Cleaning" ignoreFailures="true" />
     </goal>
 
-    <!-- 
-    Currently fails
-    <goal name="allSite" description="Build the site for the master project and all subprojects">
-    	<maven:reactor basedir="${basedir}" includes="maven-plugin/project.xml" goals="site"
-    		banner="Building Site" postProcessing="false" ignoreFailures="false" />
-    	<attainGoal name="multiproject:site" />
-    </goal>
-    -->
+    <goal name="allSite"
+          prereqs="multiproject:site-init" 
+          description="Build the site for the master project and all subprojects">
+
+      <!-- Modified version of multiproject:site goal not using the reactor to run the
site goal for each subproject
+           but exec it in a separate process.
+           This way one doesn't need to allocated 900M+ JVM memory to get this working!
+      -->
+      
+      <j:forEach var="reactorProject" items="${multiprojects}">
 
+        <j:set var="online" value="${maven.mode.online}"/>
+        <j:choose>
+          <j:when test="${online}">
+            <j:set var="cmdargs" value="site"/>
+          </j:when>
+          <j:otherwise>
+            <j:set var="cmdargs" value="-o site"/>
+          </j:otherwise>
+        </j:choose>
+        
+        <!-- I don't know yet if this will work on Linux too ... -->
+        <exec dir="${reactorProject.context.getVariable('basedir')}" vmlauncher="false"
failonerror="true" executable="maven">
+          <arg line="${cmdargs}"/>
+        </exec>
+      </j:forEach>        
+      
+      <echo>Now building reactor projects: ${multiprojects}</echo>
+    
+      <!-- copy each project over into ${maven.docs.dest} -->
+      <j:forEach var="reactorProject" items="${multiprojects}">
+        <j:set var="directory" value="${maven.docs.dest}/${maven.multiproject.aggregateDir}${reactorProject.artifactId}"/>
+        <mkdir dir="${directory}"/>
+        <j:set var="fromDir" value="${reactorProject.context.getVariable('maven.docs.dest')}"/>
+        <mkdir dir="${fromDir}"/>
+        <copy toDir="${directory}">
+          <fileset dir="${fromDir}"/>
+        </copy>
+      </j:forEach>
+
+      <attainGoal name="multiproject:create-nav"/>
+      <attainGoal name="multiproject:create-overview-page"/>
+      <attainGoal name="site" />            
+    </goal>
+    
     <goal name="jetspeed2:jar:install">
         <maven:reactor basedir="${basedir}" includes="${jar.includes}" excludes="${jar.excludes}"
goals="jar:install"
             banner="Build and Install all Jetspeed 2 jars" postProcessing="false" ignoreFailures="false"
/>



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


Mime
View raw message