You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2003/09/01 11:49:32 UTC

cvs commit: incubator-geronimo README.txt maven.xml

jdillon     2003/09/01 02:49:32

  Modified:    .        README.txt maven.xml
  Log:
   o Updated how the reactor includes are generated.  Now possible to specify
     a list of comma seperated module names via -Dmodules=moduleA,moduleB
     to onlu include moduleA and moduleB in the reactor
   o Updated README to this effect
   o Read comments in maven.xml:modules:reactor:init for full details
  
  Revision  Changes    Path
  1.8       +5 -1      incubator-geronimo/README.txt
  
  Index: README.txt
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/README.txt,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- README.txt	30 Aug 2003 15:09:19 -0000	1.7
  +++ README.txt	1 Sep 2003 09:49:31 -0000	1.8
  @@ -23,6 +23,10 @@
   
   NOTE: maven rebuild currently has some problems due to a bug in the reactor.
   
  +To only build select modules (assumes that depends are installed already):
  +
  +    maven -Dmodules=common,core
  +
   To clean your workspace:
   
       maven clean
  @@ -38,6 +42,6 @@
   
   	maven run
   		
  -Rr for the HTML website:
  +For the HTML website:
   
   	maven site
  
  
  
  1.32      +100 -24   incubator-geronimo/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/maven.xml,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- maven.xml	1 Sep 2003 07:44:29 -0000	1.31
  +++ maven.xml	1 Sep 2003 09:49:31 -0000	1.32
  @@ -17,6 +17,98 @@
     <!-- Modules -->
     <!-- ======= -->
     
  +  <goal name="modules:reactor:init">
  +    <!--
  +       | Determine the includes which the reactor will use.
  +       |
  +       | Uses 4 properties to control which modules will be include:
  +       |
  +       | modules.types      Comma seperated list of module types (ie. specs or modules)
  +       | modules.includes   Comma seperated list of module names (ie. common, core, ...)
  +       | modules            Same as modules.includes, modules.includes initializes to this value
  +       | modules.excludes   Comma seperated list of module names to exclude
  +       |
  +       | The end result is that modules.reactor.includes is set to the project.xml files
  +       | to include.  This is the value the reactor will use.
  +       |
  +       | Example, to only build the common and core modules:
  +       |
  +       | maven -Dmodules=common,core
  +     -->
  +    
  +    <j:if test="${context.getVariable('module.types') == null}">
  +      <j:set var="module.types" value="modules,specs"/>
  +    </j:if>
  +    
  +    <j:if test="${context.getVariable('modules') == null}">
  +      <!-- The default it to build everything -->
  +      <j:set var="modules" value="*"/>
  +    </j:if>
  +    
  +    <j:if test="${context.getVariable('module.includes') == null}">
  +      <j:set var="module.includes" value="${modules}"/>
  +    </j:if>
  +    
  +    <j:if test="${context.getVariable('module.excludes') == null}">
  +      <j:set var="module.excludes" value=""/>
  +    </j:if>
  +    
  +    <u:tokenize var="types" delim=",">${module.types}</u:tokenize>
  +    
  +    <ant:fileScanner var="scanner">
  +      <ant:fileset dir="${basedir}">
  +        <j:forEach var="type" items="${types}">
  +          <j:choose>
  +            <j:when test="${context.getVariable('module.includes') == '*'}">
  +              <ant:include name="${type}/*/project.xml"/>
  +            </j:when>
  +            <j:otherwise>
  +              <u:tokenize var="includes" delim=",">${module.includes}</u:tokenize>
  +              <j:forEach var="include" items="${includes}">
  +                <u:available file="${basedir}/${type}/${include}/project.xml">
  +                  <ant:include name="${type}/${include}/project.xml"/>
  +                </u:available>
  +              </j:forEach>
  +            </j:otherwise>
  +          </j:choose>
  +        
  +          <j:choose>
  +            <j:when test="${context.getVariable('module.excludes') == '*'}">
  +              <ant:exclude name="${type}/*/project.xml"/>
  +            </j:when>
  +            <j:otherwise>
  +              <u:tokenize var="excludes" delim=",">${module.excludes}</u:tokenize>
  +              <j:forEach var="exclude" items="${excludes}">
  +                <u:available file="${basedir}/${type}/${exclude}/project.xml">
  +                  <ant:exclude name="${type}/${exclude}/project.xml"/>
  +                </u:available>
  +              </j:forEach>
  +            </j:otherwise>
  +          </j:choose>
  +        </j:forEach>
  +      </ant:fileset>
  +    </ant:fileScanner>
  +    
  +    <!-- Setup the includes which will be used by the reactor -->
  +    <j:forEach var="file" items="${scanner.iterator()}">
  +      <!--
  +         | Would be nice if reactor would take a file set, but for now just remove
  +         | the baseddir portion of the file's name.  So this will essential strip off
  +         | ${basedir}
  +       -->
  +      <j:set var="filename"
  +             value="${file.parentFile.parentFile.name}/${file.parentFile.name}/${file.name}"/>
  +      <j:choose>
  +        <j:when test="${context.getVariable('modules.reactor.includes') == null}">
  +          <j:set var="modules.reactor.includes" value="${filename}"/>
  +        </j:when>
  +        <j:otherwise>
  +          <j:set var="modules.reactor.includes" value="${modules.reactor.includes},${filename}"/>
  +        </j:otherwise>
  +      </j:choose>
  +    </j:forEach>
  +  </goal>
  +  
     <!-- Helper tags for modules -->
     <define:taglib uri="local:modules">
       
  @@ -28,28 +120,13 @@
           </j:if>
         </j:if>
         
  -      <!--
  -         | TODO: Need to make this more friendly for including a few modules
  -       -->
  -       
  -      <j:if test="${empty(module)}">
  -        <j:set var="module" value="*"/>
  -      </j:if>
  -      
  -      <j:if test="${context.getVariable('modules.includes') == null}">
  -        <j:set var="modules.includes" value="modules/${module}/project.xml,specs/${module}/project.xml"/>
  -      </j:if>
  -      
  -      <j:if test="${context.getVariable('modules.excludes') == null}">
  -        <j:set var="modules.excludes" value="modules/xbeans/project.xml"/>
  -      </j:if>
  +      <attainGoal name="modules:reactor:init"/>
         
         <j:choose>
           <j:when test="${goals != null}">
             <maven:reactor
                 basedir="${basedir}"
  -              includes="${modules.includes}"
  -              excludes="${modules.excludes}"
  +              includes="${modules.reactor.includes}"
                 banner="Executing (${goals}):"
                 ignoreFailures="false"
                 goals="${goals}"
  @@ -59,8 +136,7 @@
           <j:when test="${goals == null}">
             <maven:reactor
                 basedir="${basedir}"
  -              includes="${modules.includes}"
  -              excludes="${modules.excludes}"
  +              includes="${modules.reactor.includes}"
                 banner="Executing (${goals}):"
                 ignoreFailures="false"
                 postProcessing="true"
  @@ -316,13 +392,13 @@
     </postGoal>
     
     <preGoal name="site">
  -    <attainGoal name="modules:copy-site"/>
  +    <attainGoal name="modules:aggregate:site"/>
     </preGoal>
     
  -  <goal name="modules:copy-site" prereqs="modules:site"
  +  <goal name="modules:copy-site" prereqs="modules:aggregate:site"
           description="Copy the generated websites of all the modules into the root project">
       
  -    <ant:echo>Aggregating module documentation...</ant:echo>
  +    <ant:echo>Aggregating module site documentation...</ant:echo>
       
       <!-- Setup the target aggregation directory -->
       <j:set var="aggregate.dir" value="${basedir}/target/docs"/>
  @@ -349,7 +425,7 @@
     </goal>
     
     <goal name="site:tocvs"
  -    description="Creates the entire website and copies it to the local CVS repository so that it can be checked in to update the Incubator site">
  +        description="Creates the entire website and copies it to the local CVS repository so that it can be checked in to update the Incubator site">
       
       <j:jelly xmlns="jelly:ant">