You are viewing a plain text version of this content. The canonical link for it is here.
Posted to m2-dev@maven.apache.org by jv...@apache.org on 2004/10/24 06:10:17 UTC

cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/util GoalWalker.java

jvanzyl     2004/10/23 21:10:17

  Modified:    maven-core/src/main/java/org/apache/maven/util
                        GoalWalker.java
  Log:
  o license
  
  Revision  Changes    Path
  1.2       +24 -2     maven-components/maven-core/src/main/java/org/apache/maven/util/GoalWalker.java
  
  Index: GoalWalker.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/util/GoalWalker.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- GoalWalker.java	21 Sep 2004 23:11:16 -0000	1.1
  +++ GoalWalker.java	24 Oct 2004 04:10:17 -0000	1.2
  @@ -1,6 +1,21 @@
  -/* Created on Sep 21, 2004 */
   package org.apache.maven.util;
   
  +/*
  + * Copyright 2001-2004 The Apache Software Foundation.
  + *
  + * Licensed under the Apache License, Version 2.0 (the "License");
  + * you may not use this file except in compliance with the License.
  + * You may obtain a copy of the License at
  + *
  + *      http://www.apache.org/licenses/LICENSE-2.0
  + *
  + * Unless required by applicable law or agreed to in writing, software
  + * distributed under the License is distributed on an "AS IS" BASIS,
  + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  + * See the License for the specific language governing permissions and
  + * limitations under the License.
  + */
  +
   import java.util.Iterator;
   import java.util.List;
   
  @@ -21,25 +36,31 @@
               visitor.preVisit( goal, session );
   
               List preGoals = session.getPreGoals( goal );
  +
               if ( preGoals != null )
               {
                   for ( Iterator it = preGoals.iterator(); it.hasNext(); )
                   {
                       String preGoal = (String) it.next();
  +
                       visitor.visitPreGoal( goal, preGoal, session );
                   }
               }
   
               PluginManager pluginManager = session.getPluginManager();
  +
               MojoDescriptor mojoDescriptor = pluginManager.getMojoDescriptor( goal );
  +
               if ( mojoDescriptor != null )
               {
                   List prereqs = mojoDescriptor.getPrereqs();
  +
                   if ( prereqs != null )
                   {
                       for ( Iterator it = prereqs.iterator(); it.hasNext(); )
                       {
                           String prereq = (String) it.next();
  +
                           visitor.visitPrereq( goal, prereq, session );
                       }
                   }
  @@ -48,11 +69,13 @@
               visitor.visitGoal( goal, session );
   
               List postGoals = session.getPostGoals( goal );
  +
               if ( postGoals != null )
               {
                   for ( Iterator it = postGoals.iterator(); it.hasNext(); )
                   {
                       String postGoal = (String) it.next();
  +
                       visitor.visitPostGoal( goal, postGoal, session );
                   }
               }
  @@ -60,5 +83,4 @@
               visitor.postVisit( goal, session );
           }
       }
  -
   }