maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r330999 - /maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
Date Sat, 05 Nov 2005 13:57:55 GMT
Author: jvanzyl
Date: Sat Nov  5 05:57:53 2005
New Revision: 330999

URL: http://svn.apache.org/viewcvs?rev=330999&view=rev
Log:
o give clients an easy way to retrieve a single artifact: in this case milos
  wants to be able to download a javadoc JAR.
  

Modified:
    maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java

Modified: maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java?rev=330999&r1=330998&r2=330999&view=diff
==============================================================================
--- maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
(original)
+++ maven/components/trunk/maven-embedder/src/main/java/org/apache/maven/embedder/MavenEmbedder.java
Sat Nov  5 05:57:53 2005
@@ -23,6 +23,7 @@
 import org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
+import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.artifact.manager.WagonManager;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.Artifact;
@@ -116,6 +117,8 @@
 
     private ArtifactFactory artifactFactory;
 
+    private ArtifactResolver artifactResolver;
+
     // ----------------------------------------------------------------------
     // Configuration
     // ----------------------------------------------------------------------
@@ -345,6 +348,12 @@
         return artifactFactory.createArtifact( groupId, artifactId, version, type, classifier
);
     }
 
+    public void resolve( Artifact artifact, List remoteRepositories, ArtifactRepository localRepository
)
+        throws ArtifactResolutionException, ArtifactNotFoundException
+    {
+        artifactResolver.resolve( artifact, remoteRepositories, localRepository );
+    }
+
     // ----------------------------------------------------------------------
     // Plugins
     // ----------------------------------------------------------------------
@@ -622,6 +631,8 @@
             wagonManager = (WagonManager) embedder.lookup( WagonManager.ROLE );
 
             artifactFactory = (ArtifactFactory) embedder.lookup( ArtifactFactory.ROLE );
+
+            artifactResolver = (ArtifactResolver) embedder.lookup( ArtifactResolver.ROLE
);
 
             // ----------------------------------------------------------------------
             // If an explicit local repository has not been set then we will use the



Mime
View raw message