You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2008/10/21 00:40:52 UTC

svn commit: r706437 - /maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java

Author: bentmann
Date: Mon Oct 20 15:40:52 2008
New Revision: 706437

URL: http://svn.apache.org/viewvc?rev=706437&view=rev
Log:
o Installed POM for staged dependencies via attached artifact metadata which more closely resembles things in the Install Plugin and also reduces log noise from the ArtifactInstaller by 50%

Modified:
    maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java

Modified: maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java?rev=706437&r1=706436&r2=706437&view=diff
==============================================================================
--- maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java (original)
+++ maven/plugins/trunk/maven-invoker-plugin/src/main/java/org/apache/maven/plugin/invoker/InstallMojo.java Mon Oct 20 15:40:52 2008
@@ -36,6 +36,7 @@
 import org.apache.maven.plugin.AbstractMojo;
 import org.apache.maven.plugin.MojoExecutionException;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.project.artifact.ProjectArtifactMetadata;
 
 /**
  * Installs the project artifacts of the main build into the local repository as a preparation to run the sub projects.
@@ -352,8 +353,6 @@
 
                     File artifactFile = artifact.getFile();
 
-                    installArtifact( artifactFile, depArtifact, testRepository );
-
                     Artifact pomArtifact =
                         artifactFactory.createArtifact( artifact.getGroupId(), artifact.getArtifactId(),
                                                         artifact.getBaseVersion(), null, "pom" );
@@ -361,8 +360,10 @@
                     File pomFile = new File( localRepository.getBasedir(), localRepository.pathOf( pomArtifact ) );
                     if ( pomFile.exists() )
                     {
-                        installArtifact( pomFile, pomArtifact, testRepository );
+                        depArtifact.addMetadata( new ProjectArtifactMetadata( depArtifact, pomFile ) );
                     }
+
+                    installArtifact( artifactFile, depArtifact, testRepository );
                 }
             }
         }