maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/java/org/apache/maven/plugin DefaultPluginManager.java
Date Sat, 19 Mar 2005 00:22:28 GMT
brett       2005/03/18 16:22:28

  Modified:    maven-core/src/main/java/org/apache/maven/plugin
                        DefaultPluginManager.java
  Log:
  override with goal configuration if it exists
  
  Revision  Changes    Path
  1.57      +20 -1     maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java
  
  Index: DefaultPluginManager.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java,v
  retrieving revision 1.56
  retrieving revision 1.57
  diff -u -r1.56 -r1.57
  --- DefaultPluginManager.java	18 Mar 2005 23:34:44 -0000	1.56
  +++ DefaultPluginManager.java	19 Mar 2005 00:22:28 -0000	1.57
  @@ -28,6 +28,7 @@
   import org.apache.maven.artifact.resolver.filter.ExclusionSetFilter;
   import org.apache.maven.execution.MavenSession;
   import org.apache.maven.lifecycle.GoalExecutionException;
  +import org.apache.maven.model.Goal;
   import org.apache.maven.model.Repository;
   import org.apache.maven.monitor.event.EventDispatcher;
   import org.apache.maven.monitor.event.MavenEvents;
  @@ -545,7 +546,25 @@
                   // TODO: groupID not handled
                   if ( pluginId.equals( plugin.getArtifactId() ) )
                   {
  -                    return CollectionUtils.mergeMaps( plugin.getConfiguration(), map );
  +                    map = CollectionUtils.mergeMaps( plugin.getConfiguration(), map );
  +
  +                    // TODO: much less of this magic is needed - make the mojoDescriptor
just store the first and second part
  +                    int index = goalId.indexOf( ':' );
  +                    if ( index >= 0 )
  +                    {
  +                        String goalName = goalId.substring( index + 1 );
  +                        for ( Iterator j = plugin.getGoals().iterator(); j.hasNext(); )
  +                        {
  +                            Goal goal = (Goal) j.next();
  +                            if ( goal.getId().equals( goalName ) )
  +                            {
  +                                map = CollectionUtils.mergeMaps( goal.getConfiguration(),
map );
  +                                break;
  +                            }
  +                        }
  +                    }
  +
  +                    return map;
                   }
               }
           }
  
  
  

Mime
View raw message