jvanzyl     2003/01/27 19:27:00

  Modified:    src/java/org/apache/maven/jelly/tags/maven ReactorTag.java
  Log:
  o only try to attain goals if they are set.
  o place the ${reactorProjects} in the local context so
    they are available after the projects have been processed.
  
  Revision  Changes    Path
  1.14      +11 -10    
jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java
  
  Index: ReactorTag.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/tags/maven/ReactorTag.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- ReactorTag.java   14 Jan 2003 08:26:39 -0000      1.13
  +++ ReactorTag.java   28 Jan 2003 03:27:00 -0000      1.14
  @@ -334,19 +334,20 @@
                   System.out.println( "| " + getBanner() + " " + project.getName() );
                   System.out.println( "+----------------------------------------" );
   
  -                // Make sure goals have been set.
  -                if ( getGoals() != null )
  -                {
  -                    project.setGoalNames( getGoals() );
  -                }
  -
                   // If an additional Jelly script has been specified load it as well.
                   if ( getReactorXml() != null )
                   {
                       project.loadJellyScript( getReactorXml() );
                   }
   
  -                getMavenContext().getMavenSession().attainGoals( project );
  +                // We only try to attain goals if they have been set. The reactor
  +                // might be in use to collect project information for the purpose
  +                // of, say, generating a sites from a set of components.
  +                if ( getGoals() != null )
  +                {
  +                    project.setGoalNames( getGoals() );
  +                    getMavenContext().getMavenSession().attainGoals( project );
  +                }
   
                   if ( getPostProcessing() )
                   {
  @@ -371,6 +372,6 @@
               }
           }
   
  -        
getMavenContext().getMavenSession().getRootContext().setVariable("reactorProjects", 
reactorProjects);
  +        getContext().setVariable("reactorProjects", reactorProjects);
       }
   }
  
  
  

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

Reply via email to