maven-m2-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: maven-components/maven-core/src/main/resources/org/apache/maven plexus.xml
Date Thu, 17 Jun 2004 19:38:50 GMT
jvanzyl     2004/06/17 12:38:50

  Modified:    maven-core/src/main/java/org/apache/maven
                        MavenConstants.java
               maven-core/src/main/java/org/apache/maven/lifecycle/phase
                        GoalResolutionPhase.java
               maven-core/src/main/resources/org/apache/maven plexus.xml
  Added:       maven-core/src/main/java/org/apache/maven/lifecycle/phase
                        DependencyDownloadPhase.java
  Removed:     maven-core/src/main/java/org/apache/maven/lifecycle/phase
                        ArtifactDownloadPhase.java
  Log:
  o complete the DependencyDownloadPhase
  o added an integration test that nukes the expected JAR from the local
    repo and downloads it and makes sure it is present after the build.
  
  Revision  Changes    Path
  1.2       +2 -0      maven-components/maven-core/src/main/java/org/apache/maven/MavenConstants.java
  
  Index: MavenConstants.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/MavenConstants.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MavenConstants.java	11 Jun 2004 15:11:52 -0000	1.1
  +++ MavenConstants.java	17 Jun 2004 19:38:50 -0000	1.2
  @@ -25,4 +25,6 @@
       public static final String DEBUG_ON = "maven.debugOn";
   
       public static final String MAVEN_HOME = "m2.home";
  +
  +    public static final String MAVEN_REPO_LOCAL = "maven.repo.local";
   }
  
  
  
  1.3       +13 -1     maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/phase/GoalResolutionPhase.java
  
  Index: GoalResolutionPhase.java
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/phase/GoalResolutionPhase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GoalResolutionPhase.java	17 Jun 2004 14:45:47 -0000	1.2
  +++ GoalResolutionPhase.java	17 Jun 2004 19:38:50 -0000	1.3
  @@ -16,9 +16,21 @@
       public void execute( MavenLifecycleContext context )
           throws Exception
       {
  +        // Here will will end up getting information about preGoals and postGoals and
  +        // the calculation here will get more sophisticated.
  +
           PluginManager pluginManager = (PluginManager) context.getContainer().lookup( PluginManager.ROLE
);
   
           List goals = pluginManager.getGoals( context.getGoal().getName() );
  +
  +        // Once we have the list of goals that the user has specified then we must process
  +        // this list and determine the decorations, then for each of the decorations we
  +        // must calculate the goal chain it produces. Then we mesh together all the graphs
  +        // and we can probably optimize.
  +        //
  +        // We will most likely have goals like "clean" which are executed regardless of
whether
  +        // it has been executed or not and we may have goals for which duplicate execution
can
  +        // be eliminated.
   
           context.setResolvedGoals( goals );
       }
  
  
  
  1.1                  maven-components/maven-core/src/main/java/org/apache/maven/lifecycle/phase/DependencyDownloadPhase.java
  
  Index: DependencyDownloadPhase.java
  ===================================================================
  package org.apache.maven.lifecycle.phase;
  
  import org.apache.maven.lifecycle.AbstractMavenLifecyclePhase;
  import org.apache.maven.lifecycle.MavenLifecycleContext;
  import org.apache.maven.artifact.resolver.ArtifactResolver;
  import org.apache.maven.artifact.MavenArtifact;
  import org.apache.maven.MavenConstants;
  
  import java.util.Iterator;
  import java.util.List;
  
  /**
   * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
   * @version $Id: DependencyDownloadPhase.java,v 1.1 2004/06/17 19:38:50 jvanzyl Exp $
   */
  public class DependencyDownloadPhase
      extends AbstractMavenLifecyclePhase
  {
      public void execute( MavenLifecycleContext context )
          throws Exception
      {
          ArtifactResolver artifactResolver = (ArtifactResolver) context.lookup( ArtifactResolver.ROLE
);
  
          List repositories = context.getProject().getRepositories();
  
          String mavenRepoLocal = context.getProject().getProperty( MavenConstants.MAVEN_REPO_LOCAL
);
  
          for ( Iterator it = context.getProject().getArtifacts().iterator(); it.hasNext();
)
          {
              MavenArtifact artifact = (MavenArtifact) it.next();
  
              artifactResolver.getArtifact( artifact.getDependency(),
                                            artifact.getDependency().getType(),
                                            mavenRepoLocal,
                                            repositories );
          }
      }
  }
  
  
  
  1.9       +1 -1      maven-components/maven-core/src/main/resources/org/apache/maven/plexus.xml
  
  Index: plexus.xml
  ===================================================================
  RCS file: /home/cvs/maven-components/maven-core/src/main/resources/org/apache/maven/plexus.xml,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- plexus.xml	17 Jun 2004 01:30:59 -0000	1.8
  +++ plexus.xml	17 Jun 2004 19:38:50 -0000	1.9
  @@ -53,8 +53,8 @@
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.GoalDecorationPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.GoalResolutionPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.DependencyResolutionPhase"/>
  +          <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.DependencyDownloadPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.PluginDownloadPhase"/>
  -          <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.ArtifactDownloadPhase"/>
             <lifecycle-phase implementation="org.apache.maven.lifecycle.phase.GoalAttainmentPhase"/>
           </lifecycle-phases>
         </configuration>
  
  
  

Mime
View raw message