maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1635388 - in /maven/shared/trunk/maven-artifact-resolver: ./ src/main/java/org/apache/maven/ src/main/java/org/apache/maven/shared/artifact/resolver/
Date Thu, 30 Oct 2014 05:51:47 GMT
Author: hboutemy
Date: Thu Oct 30 05:51:47 2014
New Revision: 1635388

URL: http://svn.apache.org/r1635388
Log:
upgraded parent pom

Modified:
    maven/shared/trunk/maven-artifact-resolver/pom.xml
    maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
    maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/CumulativeScopeArtifactFilter.java
    maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/DefaultProjectDependenciesResolver.java

Modified: maven/shared/trunk/maven-artifact-resolver/pom.xml
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-resolver/pom.xml?rev=1635388&r1=1635387&r2=1635388&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-resolver/pom.xml (original)
+++ maven/shared/trunk/maven-artifact-resolver/pom.xml Thu Oct 30 05:51:47 2014
@@ -25,7 +25,7 @@ under the License.
   <parent>
     <artifactId>maven-shared-components</artifactId>
     <groupId>org.apache.maven.shared</groupId>
-    <version>20</version>
+    <version>21</version>
     <relativePath>../maven-shared-components/pom.xml</relativePath>
   </parent>
 

Modified: maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/ProjectDependenciesResolver.java?rev=1635388&r1=1635387&r2=1635388&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
(original)
+++ maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/ProjectDependenciesResolver.java
Thu Oct 30 05:51:47 2014
@@ -23,7 +23,6 @@ import org.apache.maven.artifact.Artifac
 import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
 import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.execution.MavenSession;
-import org.apache.maven.model.Dependency;
 import org.apache.maven.project.MavenProject;
 
 import java.util.Collection;
@@ -47,11 +46,11 @@ public interface ProjectDependenciesReso
      * @param session Contains the local repository, along with other settings related to
artifact resolution.
      * @return The set of resolved artifacts. If the projects contain no dependencies, this
will return an empty set.
      * @throws ArtifactResolutionException In case {@link Artifact} instances cannot be created
from 
-     *          project {@link Dependency} instances, or artifact resolution fails.
+     *          project {@link org.apache.maven.model.Dependency} instances, or artifact
resolution fails.
      * @throws ArtifactNotFoundException In cases where one or more dependency artifacts
cannot be found in the
      *          various repositories.
      */
-    public Set<Artifact> resolve( Collection<? extends MavenProject> projects,
Collection<String> scopes,
+    Set<Artifact> resolve( Collection<? extends MavenProject> projects, Collection<String>
scopes,
                                   MavenSession session )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 
@@ -64,10 +63,10 @@ public interface ProjectDependenciesReso
      * @param session Contains the local repository, along with other settings related to
artifact resolution.
      * @return The set of resolved artifacts. If the project contains no dependencies, this
will return an empty set.
      * @throws ArtifactResolutionException In case {@link Artifact} instances cannot be created
from the
-     *          project {@link Dependency} instance, or artifact resolution fails.
+     *          project {@link org.apache.maven.model.Dependency} instance, or artifact resolution
fails.
      * @throws ArtifactNotFoundException In cases where one or more dependency artifacts
cannot be found in the
      *          various repositories.
      */
-    public Set<Artifact> resolve( MavenProject project, Collection<String> scopes,
MavenSession session  )
+    Set<Artifact> resolve( MavenProject project, Collection<String> scopes, MavenSession
session  )
         throws ArtifactResolutionException, ArtifactNotFoundException;
 }

Modified: maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/CumulativeScopeArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/CumulativeScopeArtifactFilter.java?rev=1635388&r1=1635387&r2=1635388&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/CumulativeScopeArtifactFilter.java
(original)
+++ maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/CumulativeScopeArtifactFilter.java
Thu Oct 30 05:51:47 2014
@@ -23,13 +23,12 @@ import java.util.Collection;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter;
 
 /**
  * Filter to only retain objects in the given scope or better. This implementation allows
the 
  * accumulation of multiple scopes and their associated implied scopes, so that the user
can filter
  * apply a series of implication rules in a single step. This should be a more efficient
implementation
- * of multiple standard {@link ScopeArtifactFilter} instances ORed together.
+ * of multiple standard {@link org.apache.maven.artifact.resolver.filter.ScopeArtifactFilter}
instances ORed together.
  *
  * @author <a href="mailto:brett@apache.org">Brett Porter</a>
  * @author jdcasey

Modified: maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/DefaultProjectDependenciesResolver.java
URL: http://svn.apache.org/viewvc/maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/DefaultProjectDependenciesResolver.java?rev=1635388&r1=1635387&r2=1635388&view=diff
==============================================================================
--- maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/DefaultProjectDependenciesResolver.java
(original)
+++ maven/shared/trunk/maven-artifact-resolver/src/main/java/org/apache/maven/shared/artifact/resolver/DefaultProjectDependenciesResolver.java
Thu Oct 30 05:51:47 2014
@@ -69,11 +69,13 @@ public final class DefaultProjectDepende
     private ArtifactMetadataSource metadataSource;
     
     // for plexus instantiation.
-    public DefaultProjectDependenciesResolver(){}
+    public DefaultProjectDependenciesResolver()
+    {
+    }
 
     // for testing.
     DefaultProjectDependenciesResolver( ArtifactResolver resolver, ArtifactFactory artifactFactory,
-                                               ArtifactMetadataSource metadataSource )
+                                        ArtifactMetadataSource metadataSource )
     {
         this.resolver = resolver;
         this.artifactFactory = artifactFactory;
@@ -97,19 +99,19 @@ public final class DefaultProjectDepende
 
         CumulativeScopeArtifactFilter scopeFilter = new CumulativeScopeArtifactFilter( scopes
);
         
-        for ( MavenProject project : projects )
+        for ( MavenProject proj : projects )
         {
-            Set<Artifact> depArtifacts = project.getDependencyArtifacts();
+            Set<Artifact> depArtifacts = proj.getDependencyArtifacts();
             if ( depArtifacts == null )
             {
                 try
                 {
-                    depArtifacts = project.createArtifacts( artifactFactory, null, scopeFilter
);
+                    depArtifacts = proj.createArtifacts( artifactFactory, null, scopeFilter
);
                 }
                 catch ( InvalidDependencyVersionException e )
                 {
-                    throw new ArtifactResolutionException( "Failed to create Artifact instances
for project dependencies: "
-                        + e.getMessage(), null, e );
+                    throw new ArtifactResolutionException( "Failed to create Artifact instances
for project "
+                        + "dependencies: " + e.getMessage(), null, e );
                 }
             }
             
@@ -128,19 +130,19 @@ public final class DefaultProjectDepende
                 }
             }
             
-            Artifact projectArtifact = project.getArtifact();
+            Artifact projectArtifact = proj.getArtifact();
             if ( projectArtifact == null )
             {
-                projectArtifact = artifactFactory.createProjectArtifact( project.getGroupId(),
project.getArtifactId(),
-                                                                     project.getVersion()
);
+                projectArtifact = artifactFactory.createProjectArtifact( proj.getGroupId(),
proj.getArtifactId(),
+                                                                     proj.getVersion() );
             }
             
             try
             {
                 ArtifactResolutionResult result = resolver.resolveTransitively( depArtifacts,
projectArtifact,
-                                                                                project.getManagedVersionMap(),
+                                                                                proj.getManagedVersionMap(),
                                                                                 session.getLocalRepository(),
-                                                                                project.getRemoteArtifactRepositories(),
+                                                                                proj.getRemoteArtifactRepositories(),
                                                                                 metadataSource,
scopeFilter );
 
                 if ( result.getArtifacts() != null && !result.getArtifacts().isEmpty()
)
@@ -179,7 +181,8 @@ public final class DefaultProjectDepende
     /**
      * {@inheritDoc}
      */
-    public Set<Artifact> resolve( final MavenProject project, final Collection<String>
scopes, final MavenSession session )
+    public Set<Artifact> resolve( final MavenProject project, final Collection<String>
scopes,
+                                  final MavenSession session )
         throws ArtifactResolutionException, ArtifactNotFoundException
     {
         Collection<MavenProject> projects = Collections.singleton( project );



Mime
View raw message