You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2018/03/30 19:00:29 UTC

[maven-project-info-reports-plugin] branch MPIR-366 updated (a4b740a -> 5e1a836)

This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a change to branch MPIR-366
in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git.


    from a4b740a  [MPIR-366] Replace MavenProjectBuilder with ProjectBuilder
     new 824e67f  [MPIR-366] Replace ArtifactResolver
     new 5e1a836  MPIR-366: Replace WagonManager

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pom.xml                                            |  31 ++++-
 .../projectinfo/AbstractProjectInfoReport.java     |   2 +-
 .../report/projectinfo/DependenciesReport.java     |  10 +-
 .../projectinfo/DependencyManagementReport.java    |   8 +-
 .../projectinfo/dependencies/RepositoryUtils.java  | 155 ++++-----------------
 .../renderer/DependenciesRenderer.java             |  12 +-
 .../wagon/WagonRepositoryConnector.java}           |  35 ++---
 .../wagon/WagonRepositoryConnectorException.java}  |  17 ++-
 .../wagon/WagonRepositoryConnectorFactory.java     |  42 ++++++
 .../DefaultWagonRepositoryConnectorFactory.java    | 104 ++++++++++++++
 .../report/projectinfo/wagon/internal/Invoker.java | 106 ++++++++++++++
 .../internal/Maven30WagonRepositoryConnector.java  | 115 +++++++++++++++
 .../Maven30WagonRepositoryConnectorFactory.java    |  88 ++++++++++++
 .../internal/Maven31WagonRepositoryConnector.java  | 114 +++++++++++++++
 .../Maven31WagonRepositoryConnectorFactory.java    |  93 +++++++++++++
 .../DependencyConvergenceReportTest.java           |  17 +++
 16 files changed, 773 insertions(+), 176 deletions(-)
 copy src/{test/java/org/apache/maven/report/projectinfo/stubs/ModulesStub.java => main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnector.java} (57%)
 copy src/{test/java/org/apache/maven/report/projectinfo/stubs/PluginManagementStub.java => main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorException.java} (75%)
 create mode 100644 src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorFactory.java
 create mode 100644 src/main/java/org/apache/maven/report/projectinfo/wagon/internal/DefaultWagonRepositoryConnectorFactory.java
 create mode 100644 src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Invoker.java
 create mode 100644 src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnector.java
 create mode 100644 src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnectorFactory.java
 create mode 100644 src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnector.java
 create mode 100644 src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnectorFactory.java

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.

[maven-project-info-reports-plugin] 01/02: [MPIR-366] Replace ArtifactResolver

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MPIR-366
in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git

commit 824e67f448af645b50143a931fa9f379fed34bd7
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri Mar 30 14:37:25 2018 +0200

    [MPIR-366] Replace ArtifactResolver
---
 pom.xml                                            |  6 ++++++
 .../projectinfo/AbstractProjectInfoReport.java     |  2 +-
 .../projectinfo/dependencies/RepositoryUtils.java  | 25 +++++++++++-----------
 .../renderer/DependenciesRenderer.java             | 12 +++--------
 4 files changed, 22 insertions(+), 23 deletions(-)

diff --git a/pom.xml b/pom.xml
index 933cfc0..c4a01bb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -201,6 +201,12 @@ under the License.
       <artifactId>maven-common-artifact-filters</artifactId>
       <version>3.0.1</version>
     </dependency>
+    <dependency>
+      <groupId>org.apache.maven.shared</groupId>
+      <artifactId>maven-artifact-transfer</artifactId>
+      <version>0.9.1</version>
+    </dependency>
+    
 
     <!-- Wagon -->
     <dependency>
diff --git a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
index 6c1ecf7..9a033e9 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/AbstractProjectInfoReport.java
@@ -39,7 +39,6 @@ import java.util.ResourceBundle;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
-import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.doxia.site.decoration.Body;
 import org.apache.maven.doxia.site.decoration.DecorationModel;
 import org.apache.maven.doxia.siterenderer.Renderer;
@@ -59,6 +58,7 @@ import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.reporting.AbstractMavenReport;
 import org.apache.maven.reporting.MavenReportException;
 import org.apache.maven.settings.Settings;
+import org.apache.maven.shared.artifact.resolve.ArtifactResolver;
 import org.codehaus.plexus.i18n.I18N;
 import org.codehaus.plexus.interpolation.EnvarBasedValueSource;
 import org.codehaus.plexus.interpolation.InterpolationException;
diff --git a/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java b/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
index 743229a..bdebb78 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
@@ -33,10 +33,8 @@ import org.apache.maven.artifact.repository.metadata.Metadata;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
 import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata;
 import org.apache.maven.artifact.repository.metadata.Versioning;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
-import org.apache.maven.artifact.resolver.ArtifactResolver;
 import org.apache.maven.plugin.logging.Log;
+import org.apache.maven.project.DefaultProjectBuildingRequest;
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
@@ -44,6 +42,9 @@ import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.repository.legacy.WagonConfigurationException;
 import org.apache.maven.settings.Proxy;
 import org.apache.maven.settings.Settings;
+import org.apache.maven.shared.artifact.resolve.ArtifactResolver;
+import org.apache.maven.shared.artifact.resolve.ArtifactResolverException;
+import org.apache.maven.shared.artifact.resolve.ArtifactResult;
 import org.apache.maven.wagon.ConnectionException;
 import org.apache.maven.wagon.TransferFailedException;
 import org.apache.maven.wagon.UnsupportedProtocolException;
@@ -139,19 +140,21 @@ public class RepositoryUtils
 
     /**
      * @param artifact not null
-     * @throws ArtifactResolutionException if any
-     * @throws ArtifactNotFoundException if any
-     * @see ArtifactResolver#resolve(Artifact, List, ArtifactRepository)
+     * @throws ArtifactResolverException if any 
      */
     public void resolve( Artifact artifact )
-        throws ArtifactResolutionException, ArtifactNotFoundException
+        throws ArtifactResolverException
     {
         List<ArtifactRepository> repos =
             new ArrayList<ArtifactRepository>( pluginRepositories.size() + remoteRepositories.size() );
         repos.addAll( pluginRepositories );
         repos.addAll( remoteRepositories );
+        
+        ProjectBuildingRequest buildRequest = new DefaultProjectBuildingRequest( buildingRequest );
+        buildRequest.setRemoteRepositories( repos );
 
-        resolver.resolve( artifact, repos, getLocalRepository() );
+        ArtifactResult result = resolver.resolveArtifact( buildRequest , artifact );
+        artifact.setFile( result.getArtifact().getFile() );
     }
 
     /**
@@ -324,14 +327,10 @@ public class RepositoryUtils
                     {
                         resolve( artifact );
                     }
-                    catch ( ArtifactResolutionException e )
+                    catch ( ArtifactResolverException e )
                     {
                         log.error( "Artifact: " + artifact.getId() + " could not be resolved." );
                     }
-                    catch ( ArtifactNotFoundException e )
-                    {
-                        log.error( "Artifact: " + artifact.getId() + " was not found." );
-                    }
                 }
 
                 for ( ArtifactMetadata m : artifact.getMetadataList() )
diff --git a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
index cc661cc..fb19a37 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/dependencies/renderer/DependenciesRenderer.java
@@ -45,8 +45,6 @@ import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.ArtifactRepositoryPolicy;
-import org.apache.maven.artifact.resolver.ArtifactNotFoundException;
-import org.apache.maven.artifact.resolver.ArtifactResolutionException;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.SinkEventAttributeSet;
 import org.apache.maven.doxia.sink.SinkEventAttributes;
@@ -63,6 +61,7 @@ import org.apache.maven.report.projectinfo.dependencies.Dependencies;
 import org.apache.maven.report.projectinfo.dependencies.DependenciesReportConfiguration;
 import org.apache.maven.report.projectinfo.dependencies.RepositoryUtils;
 import org.apache.maven.settings.Settings;
+import org.apache.maven.shared.artifact.resolve.ArtifactResolverException;
 import org.apache.maven.shared.dependency.graph.DependencyNode;
 import org.apache.maven.shared.jar.JarData;
 import org.codehaus.plexus.i18n.I18N;
@@ -1275,12 +1274,7 @@ public class DependenciesRenderer
                 {
                     repoUtils.resolve( artifact );
                 }
-                catch ( ArtifactResolutionException e )
-                {
-                    log.error( "Artifact " + artifact.getId() + " can't be resolved.", e );
-                    continue;
-                }
-                catch ( ArtifactNotFoundException e )
+                catch ( ArtifactResolverException e )
                 {
                     if ( ( dependencies.getProject().getGroupId().equals( artifact.getGroupId() ) )
                         && ( dependencies.getProject().getArtifactId().equals( artifact.getArtifactId() ) )
@@ -1290,7 +1284,7 @@ public class DependenciesRenderer
                     }
                     else
                     {
-                        log.error( "Artifact " + artifact.getId() + " not found.", e );
+                        log.error( "Artifact " + artifact.getId() + " can't be resolved.", e );
                     }
 
                     continue;

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.

[maven-project-info-reports-plugin] 02/02: MPIR-366: Replace WagonManager

Posted by rf...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rfscholte pushed a commit to branch MPIR-366
in repository https://gitbox.apache.org/repos/asf/maven-project-info-reports-plugin.git

commit 5e1a83656695556fa4342a95b62cd14ef7931866
Author: rfscholte <rf...@apache.org>
AuthorDate: Fri Mar 30 21:00:20 2018 +0200

    MPIR-366: Replace WagonManager
---
 pom.xml                                            |  25 +++-
 .../report/projectinfo/DependenciesReport.java     |  10 +-
 .../projectinfo/DependencyManagementReport.java    |   8 +-
 .../projectinfo/dependencies/RepositoryUtils.java  | 130 +++------------------
 .../wagon/WagonRepositoryConnector.java            |  39 +++++++
 .../wagon/WagonRepositoryConnectorException.java   |  34 ++++++
 .../wagon/WagonRepositoryConnectorFactory.java     |  42 +++++++
 .../DefaultWagonRepositoryConnectorFactory.java    | 104 +++++++++++++++++
 .../report/projectinfo/wagon/internal/Invoker.java | 106 +++++++++++++++++
 .../internal/Maven30WagonRepositoryConnector.java  | 115 ++++++++++++++++++
 .../Maven30WagonRepositoryConnectorFactory.java    |  88 ++++++++++++++
 .../internal/Maven31WagonRepositoryConnector.java  | 114 ++++++++++++++++++
 .../Maven31WagonRepositoryConnectorFactory.java    |  93 +++++++++++++++
 .../DependencyConvergenceReportTest.java           |  17 +++
 14 files changed, 801 insertions(+), 124 deletions(-)

diff --git a/pom.xml b/pom.xml
index c4a01bb..ff269f0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -172,6 +172,11 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.maven</groupId>
+      <artifactId>maven-aether-provider</artifactId>
+      <version>${mavenVersion}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.maven</groupId>
       <artifactId>maven-settings</artifactId>
       <version>${mavenVersion}</version>
     </dependency>
@@ -404,7 +409,13 @@ under the License.
       <groupId>org.sonatype.aether</groupId>
       <artifactId>aether-connector-wagon</artifactId>
       <version>1.7</version>
-      <scope>test</scope>
+      <scope>provided</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.eclipse.aether</groupId>
+      <artifactId>aether-connector-wagon</artifactId>
+      <version>0.9.0.M2</version>
+      <scope>provided</scope>
     </dependency>
   </dependencies>
 
@@ -452,6 +463,18 @@ under the License.
     </pluginManagement>
     <plugins>
       <plugin>
+        <groupId>org.codehaus.plexus</groupId>
+        <artifactId>plexus-component-metadata</artifactId>
+        <version>1.7.1</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>generate-metadata</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <excludes>
diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java
index c52c168..cba8db1 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/DependenciesReport.java
@@ -31,7 +31,6 @@ import java.util.Locale;
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.manager.WagonManager;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
@@ -47,6 +46,7 @@ import org.apache.maven.report.projectinfo.dependencies.Dependencies;
 import org.apache.maven.report.projectinfo.dependencies.DependenciesReportConfiguration;
 import org.apache.maven.report.projectinfo.dependencies.RepositoryUtils;
 import org.apache.maven.report.projectinfo.dependencies.renderer.DependenciesRenderer;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorFactory;
 import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
 import org.apache.maven.shared.dependency.graph.DependencyGraphBuilderException;
 import org.apache.maven.shared.dependency.graph.DependencyNode;
@@ -88,12 +88,10 @@ public class DependenciesReport
     protected ArtifactMetadataSource artifactMetadataSource;
 
     /**
-     * Wagon manager component.
-     *
-     * @since 2.1
+     * @since 3.0.0
      */
     @Component
-    private WagonManager wagonManager;
+    private WagonRepositoryConnectorFactory wagonRepositoryConnectorFactory;
 
     /**
      * Dependency graph builder component.
@@ -193,7 +191,7 @@ public class DependenciesReport
         buildingRequest.setRemoteRepositories( remoteRepositories );
 
         RepositoryUtils repoUtils =
-            new RepositoryUtils( getLog(), wagonManager, settings, projectBuilder, factory, resolver,
+            new RepositoryUtils( getLog(), wagonRepositoryConnectorFactory, projectBuilder, factory, resolver,
                                  project.getRemoteArtifactRepositories(), project.getPluginArtifactRepositories(),
                                  buildingRequest, repositoryMetadataManager );
 
diff --git a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java
index 7d116c5..5b4777f 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/DependencyManagementReport.java
@@ -22,7 +22,6 @@ package org.apache.maven.report.projectinfo;
 import java.util.Locale;
 
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.manager.WagonManager;
 import org.apache.maven.artifact.metadata.ArtifactMetadataSource;
 import org.apache.maven.artifact.repository.metadata.RepositoryMetadataManager;
 import org.apache.maven.plugins.annotations.Component;
@@ -34,6 +33,7 @@ import org.apache.maven.project.ProjectBuildingRequest;
 import org.apache.maven.report.projectinfo.dependencies.ManagementDependencies;
 import org.apache.maven.report.projectinfo.dependencies.RepositoryUtils;
 import org.apache.maven.report.projectinfo.dependencies.renderer.DependencyManagementRenderer;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorFactory;
 
 /**
  * Generates the Project Dependency Management report.
@@ -73,10 +73,10 @@ public class DependencyManagementReport
     /**
      * Wagon manager component.
      *
-     * @since 2.3
+     * @since 3.0.0
      */
     @Component
-    private WagonManager wagonManager;
+    private WagonRepositoryConnectorFactory wagonRepositoryConnectorFactory;
 
     /**
      * Repository metadata component.
@@ -120,7 +120,7 @@ public class DependencyManagementReport
         buildingRequest.setRemoteRepositories( remoteRepositories );
         
         RepositoryUtils repoUtils =
-            new RepositoryUtils( getLog(), wagonManager, settings, projectBuilder, factory, resolver,
+            new RepositoryUtils( getLog(), wagonRepositoryConnectorFactory, projectBuilder, factory, resolver,
                                  project.getRemoteArtifactRepositories(), project.getPluginArtifactRepositories(),
                                  buildingRequest, repositoryMetadataManager );
 
diff --git a/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java b/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
index bdebb78..d54e1f4 100644
--- a/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
+++ b/src/main/java/org/apache/maven/report/projectinfo/dependencies/RepositoryUtils.java
@@ -26,7 +26,6 @@ import java.util.List;
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.ArtifactUtils;
 import org.apache.maven.artifact.factory.ArtifactFactory;
-import org.apache.maven.artifact.manager.WagonManager;
 import org.apache.maven.artifact.metadata.ArtifactMetadata;
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.metadata.Metadata;
@@ -39,22 +38,14 @@ import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.ProjectBuilder;
 import org.apache.maven.project.ProjectBuildingException;
 import org.apache.maven.project.ProjectBuildingRequest;
-import org.apache.maven.repository.legacy.WagonConfigurationException;
-import org.apache.maven.settings.Proxy;
-import org.apache.maven.settings.Settings;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnector;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorException;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorFactory;
 import org.apache.maven.shared.artifact.resolve.ArtifactResolver;
 import org.apache.maven.shared.artifact.resolve.ArtifactResolverException;
 import org.apache.maven.shared.artifact.resolve.ArtifactResult;
-import org.apache.maven.wagon.ConnectionException;
 import org.apache.maven.wagon.TransferFailedException;
-import org.apache.maven.wagon.UnsupportedProtocolException;
-import org.apache.maven.wagon.Wagon;
-import org.apache.maven.wagon.authentication.AuthenticationException;
-import org.apache.maven.wagon.authentication.AuthenticationInfo;
 import org.apache.maven.wagon.authorization.AuthorizationException;
-import org.apache.maven.wagon.observers.Debug;
-import org.apache.maven.wagon.proxy.ProxyInfo;
-import org.apache.maven.wagon.repository.Repository;
 import org.codehaus.plexus.util.StringUtils;
 
 /**
@@ -69,9 +60,7 @@ public class RepositoryUtils
 
     private final Log log;
 
-    private final WagonManager wagonManager;
-
-    private final Settings settings;
+    private final WagonRepositoryConnectorFactory wagonRepositoryConnectorFactory;
 
     private final ProjectBuilder projectBuilder;
 
@@ -87,8 +76,6 @@ public class RepositoryUtils
 
     /**
      * @param log {@link Log}
-     * @param wagonManager {@link WagonManager}
-     * @param settings {@link Settings}
      * @param projectBuilder {@link ProjectBuilder}
      * @param factory {@link ArtifactFactory}
      * @param resolver {@link ArtifactResolver}
@@ -96,16 +83,16 @@ public class RepositoryUtils
      * @param pluginRepositories {@link ArtifactRepository}
      * @param buildingRequest {@link ProjectBuildingRequest}
      * @param repositoryMetadataManager {@link RepositoryMetadataManager}
+     * @param wagonManager {@link WagonManager}
      */
-    public RepositoryUtils( Log log, WagonManager wagonManager, Settings settings,
-                            ProjectBuilder projectBuilder, ArtifactFactory factory,
-                            ArtifactResolver resolver, List<ArtifactRepository> remoteRepositories,
-                            List<ArtifactRepository> pluginRepositories, ProjectBuildingRequest buildingRequest,
+    public RepositoryUtils( Log log, WagonRepositoryConnectorFactory wagonRepositoryConnectorFactory,
+                            ProjectBuilder projectBuilder, ArtifactFactory factory, ArtifactResolver resolver,
+                            List<ArtifactRepository> remoteRepositories, List<ArtifactRepository> pluginRepositories,
+                            ProjectBuildingRequest buildingRequest,
                             RepositoryMetadataManager repositoryMetadataManager )
     {
         this.log = log;
-        this.wagonManager = wagonManager;
-        this.settings = settings;
+        this.wagonRepositoryConnectorFactory = wagonRepositoryConnectorFactory;
         this.projectBuilder = projectBuilder;
         this.factory = factory;
         this.resolver = resolver;
@@ -183,64 +170,23 @@ public class RepositoryUtils
             return false;
         }
 
-        repo = wagonManager.getMirrorRepository( repo );
-
-        String id = repo.getId();
-        Repository repository = new Repository( id, repo.getUrl() );
-
-        Wagon wagon;
+        WagonRepositoryConnector wagonRepositoryConnector;
         try
         {
-            wagon = wagonManager.getWagon( repository );
+            wagonRepositoryConnector = wagonRepositoryConnectorFactory.newInstance( buildingRequest, repo );
         }
-        catch ( UnsupportedProtocolException e )
+        catch ( WagonRepositoryConnectorException e )
         {
             logError( "Unsupported protocol: '" + repo.getProtocol() + "'", e );
             return false;
         }
-        catch ( WagonConfigurationException e )
-        {
-            logError( "Unsupported protocol: '" + repo.getProtocol() + "'", e );
-            return false;
-        }
-
-        wagon.setTimeout( 1000 );
-
-        if ( log.isDebugEnabled() )
-        {
-            Debug debug = new Debug();
-
-            wagon.addSessionListener( debug );
-            wagon.addTransferListener( debug );
-        }
 
         try
         {
-            // FIXME when upgrading to maven 3.x : this must be changed.
-            AuthenticationInfo auth = wagonManager.getAuthenticationInfo( repo.getId() );
-
-            ProxyInfo proxyInfo = getProxyInfo();
-            if ( proxyInfo != null )
-            {
-                wagon.connect( repository, auth, proxyInfo );
-            }
-            else
-            {
-                wagon.connect( repository, auth );
-            }
+            String resource =
+                StringUtils.replace( getDependencyUrlFromRepository( artifact, repo ), repo.getUrl(), "" );
 
-            return wagon.resourceExists( StringUtils.replace( getDependencyUrlFromRepository( artifact, repo ),
-                                                              repo.getUrl(), "" ) );
-        }
-        catch ( ConnectionException e )
-        {
-            logError( "Unable to connect to: " + repo.getUrl(), e );
-            return false;
-        }
-        catch ( AuthenticationException e )
-        {
-            logError( "Unable to connect to: " + repo.getUrl(), e );
-            return false;
+            return wagonRepositoryConnector.resourceExists( resource );
         }
         catch ( TransferFailedException e )
         {
@@ -260,21 +206,9 @@ public class RepositoryUtils
             logError( "Unable to connect to: " + repo.getUrl(), e );
             return false;
         }
-        catch ( AbstractMethodError e )
-        {
-            log.error( "Wagon " + wagon.getClass().getName() + " does not support the resourceExists method" );
-            return false;
-        }
         finally
         {
-            try
-            {
-                wagon.disconnect();
-            }
-            catch ( ConnectionException e )
-            {
-                logError( "Error disconnecting wagon - ignored", e );
-            }
+            wagonRepositoryConnector.close();
         }
     }
 
@@ -362,36 +296,6 @@ public class RepositoryUtils
         return repo.getUrl() + "/" + repo.pathOf( copyArtifact );
     }
 
-    // ----------------------------------------------------------------------
-    // Private methods
-    // ----------------------------------------------------------------------
-
-    /**
-     * Convenience method to map a <code>Proxy</code> object from the user system settings to a <code>ProxyInfo</code>
-     * object.
-     *
-     * @return a proxyInfo object instanced or null if no active proxy is define in the settings.xml
-     */
-    private ProxyInfo getProxyInfo()
-    {
-        if ( settings == null || settings.getActiveProxy() == null )
-        {
-            return null;
-        }
-
-        Proxy settingsProxy = settings.getActiveProxy();
-
-        ProxyInfo proxyInfo = new ProxyInfo();
-        proxyInfo.setHost( settingsProxy.getHost() );
-        proxyInfo.setType( settingsProxy.getProtocol() );
-        proxyInfo.setPort( settingsProxy.getPort() );
-        proxyInfo.setNonProxyHosts( settingsProxy.getNonProxyHosts() );
-        proxyInfo.setUserName( settingsProxy.getUsername() );
-        proxyInfo.setPassword( settingsProxy.getPassword() );
-
-        return proxyInfo;
-    }
-
     /**
      * Log an error, adding the stacktrace only is debug is enabled.
      * 
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnector.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnector.java
new file mode 100644
index 0000000..88fbbb7
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnector.java
@@ -0,0 +1,39 @@
+package org.apache.maven.report.projectinfo.wagon;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.wagon.TransferFailedException;
+import org.apache.maven.wagon.authorization.AuthorizationException;
+
+/**
+ * 
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+public interface WagonRepositoryConnector
+{
+    boolean resourceExists( String resourceName ) throws TransferFailedException, AuthorizationException;
+    
+    /**
+     * Closes this connector and frees any network resources associated with it. Once closed, a connector must not be
+     * used for further transfers. Closing an already closed connector has no effect.
+     */
+    void close();
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorException.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorException.java
new file mode 100644
index 0000000..44634b4
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorException.java
@@ -0,0 +1,34 @@
+package org.apache.maven.report.projectinfo.wagon;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/**
+ * 
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+public class WagonRepositoryConnectorException extends Exception
+{
+    public WagonRepositoryConnectorException( String message, Exception e )
+    {
+        super( message, e );
+    }
+
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorFactory.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorFactory.java
new file mode 100644
index 0000000..e423697
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/WagonRepositoryConnectorFactory.java
@@ -0,0 +1,42 @@
+package org.apache.maven.report.projectinfo.wagon;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.codehaus.plexus.logging.LogEnabled;
+
+/**
+ * This is based on the repository connectors of Aether/Maven Resolver.
+ * They are used to download/upload the artifacts, so the same mechanism should be used to verify which repositories
+ * provide a certain artifact. 
+ * An HTTP HEAD would be enough, but the connector only supports GET and PUT, hence this extra implementation.
+ * 
+ * This is introduced while dropping Maven2. It could very well be that this information is already available with
+ * Maven 3 via Aether, but the test coverage is not good enough to confirm this.   
+ * 
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+public interface WagonRepositoryConnectorFactory extends LogEnabled
+{
+    WagonRepositoryConnector newInstance( ProjectBuildingRequest request, ArtifactRepository repository )
+        throws WagonRepositoryConnectorException;
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/DefaultWagonRepositoryConnectorFactory.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/DefaultWagonRepositoryConnectorFactory.java
new file mode 100644
index 0000000..84164d9
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/DefaultWagonRepositoryConnectorFactory.java
@@ -0,0 +1,104 @@
+package org.apache.maven.report.projectinfo.wagon.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnector;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorException;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorFactory;
+import org.codehaus.plexus.PlexusConstants;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
+import org.codehaus.plexus.context.Context;
+import org.codehaus.plexus.context.ContextException;
+import org.codehaus.plexus.logging.Logger;
+import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
+
+/**
+ * 
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+@Component( role = WagonRepositoryConnectorFactory.class )
+public class DefaultWagonRepositoryConnectorFactory implements WagonRepositoryConnectorFactory, Contextualizable
+{
+    private Logger logger;
+    
+    private PlexusContainer container;
+
+    @Override
+    public WagonRepositoryConnector newInstance( ProjectBuildingRequest request, ArtifactRepository repository )
+        throws WagonRepositoryConnectorException
+    {
+        String hint = isMaven31() ? "maven31" : "maven3";
+        try
+        {
+            WagonRepositoryConnectorFactory factory = container.lookup( WagonRepositoryConnectorFactory.class, hint );
+            
+            factory.enableLogging( logger );
+            
+            return factory.newInstance( request, repository );
+        }
+        catch ( ComponentLookupException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+
+    protected static boolean isMaven31()
+    {
+        return canFindCoreClass( "org.eclipse.aether.artifact.Artifact" ); // Maven 3.1 specific
+    }
+
+    private static boolean canFindCoreClass( String className )
+    {
+        try
+        {
+            Thread.currentThread().getContextClassLoader().loadClass( className );
+
+            return true;
+        }
+        catch ( ClassNotFoundException e )
+        {
+            return false;
+        }
+    }
+    
+    /**
+     * Injects the Plexus content.
+     *
+     * @param context Plexus context to inject.
+     * @throws ContextException if the PlexusContainer could not be located.
+     */
+    @Override
+    public void contextualize( Context context )
+        throws ContextException
+    {
+        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+    }
+
+    @Override
+    public void enableLogging( Logger logger )
+    {
+        this.logger = logger;
+    }
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Invoker.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Invoker.java
new file mode 100644
index 0000000..4e7a115
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Invoker.java
@@ -0,0 +1,106 @@
+package org.apache.maven.report.projectinfo.wagon.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorException;
+
+/**
+ * Invokes method on objects using reflection.
+ */
+final class Invoker
+{
+    private Invoker()
+    {
+        // do not instantiate
+    }
+
+    public static Object invoke( Object object, String method )
+        throws WagonRepositoryConnectorException
+    {
+        return invoke( object.getClass(), object, method );
+    }
+
+    public static Object invoke( Class<?> objectClazz, Object object, String method )
+        throws WagonRepositoryConnectorException
+    {
+        try
+        {
+            return objectClazz.getMethod( method ).invoke( object );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+
+    public static Object invoke( Object object, String method, Class<?> clazz, Object arg )
+        throws WagonRepositoryConnectorException
+    {
+        try
+        {
+            final Class<?> objectClazz = object.getClass();
+            return objectClazz.getMethod( method, clazz ).invoke( object, arg );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+    
+    public static Object invoke( Class<?> objectClazz, String staticMethod, Class<?> argClazz, Object arg )
+                    throws WagonRepositoryConnectorException
+    {
+        try
+        {
+            return objectClazz.getMethod( staticMethod, argClazz ).invoke( null, arg );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnector.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnector.java
new file mode 100644
index 0000000..65da549
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnector.java
@@ -0,0 +1,115 @@
+package org.apache.maven.report.projectinfo.wagon.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnector;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorException;
+import org.apache.maven.wagon.TransferFailedException;
+import org.apache.maven.wagon.Wagon;
+import org.apache.maven.wagon.authorization.AuthorizationException;
+import org.apache.maven.wagon.observers.Debug;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.logging.Logger;
+import org.sonatype.aether.spi.connector.RepositoryConnector;
+
+/**
+ * 
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+class Maven30WagonRepositoryConnector implements WagonRepositoryConnector, LogEnabled
+{
+    private Logger logger;
+    
+    private Wagon wagon;
+    
+    Maven30WagonRepositoryConnector( RepositoryConnector connector )
+        throws WagonRepositoryConnectorException
+    {
+        Method pollWagonMethod;
+        try
+        {
+            pollWagonMethod = connector.getClass().getDeclaredMethod( "pollWagon" );
+            wagon = (Wagon) pollWagonMethod.invoke( connector );
+            
+            wagon.setTimeout( 1000 );
+            
+          if ( logger.isDebugEnabled() )
+          {
+              Debug debug = new Debug();
+  
+              wagon.addSessionListener( debug );
+              wagon.addTransferListener( debug );
+          }
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( SecurityException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+
+    @Override
+    public boolean resourceExists( String resourceName ) throws TransferFailedException, AuthorizationException
+    {
+        return wagon.resourceExists( resourceName );
+    }
+    
+    @Override
+    public void close()
+    {
+        try
+        {
+            if ( wagon != null )
+            {
+                wagon.disconnect();
+            }
+        }
+        catch ( Exception e )
+        {
+            // too bad
+        }
+    }
+    
+    @Override
+    public void enableLogging( Logger logger )
+    {
+        this.logger = logger;
+    }
+    
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnectorFactory.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnectorFactory.java
new file mode 100644
index 0000000..c8a45f0
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven30WagonRepositoryConnectorFactory.java
@@ -0,0 +1,88 @@
+package org.apache.maven.report.projectinfo.wagon.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.RepositoryUtils;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorException;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.annotations.Requirement;
+import org.sonatype.aether.RepositorySystemSession;
+import org.sonatype.aether.connector.wagon.WagonRepositoryConnectorFactory;
+import org.sonatype.aether.repository.RemoteRepository;
+import org.sonatype.aether.spi.connector.RepositoryConnector;
+import org.sonatype.aether.transfer.NoRepositoryConnectorException;
+
+/**
+ * 
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+@Component( role = WagonRepositoryConnectorFactory.class, hint = "maven3" )
+public class Maven30WagonRepositoryConnectorFactory
+{
+    @Requirement( role = WagonRepositoryConnectorFactory.class, hint = "wagon" )
+    private WagonRepositoryConnectorFactory wrcf;
+
+    public Maven30WagonRepositoryConnector newInstance( ProjectBuildingRequest request, ArtifactRepository repository )
+        throws WagonRepositoryConnectorException
+    {
+        try
+        {
+            RemoteRepository remoteRepository = getRemoteRepository( request.getRepositorySession(), repository );
+
+            RepositoryConnector repoConnector = wrcf.newInstance( request.getRepositorySession(), remoteRepository );
+
+            return new Maven30WagonRepositoryConnector( repoConnector );
+        }
+        catch ( NoRepositoryConnectorException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( WagonRepositoryConnectorException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+
+    private RemoteRepository getRemoteRepository( RepositorySystemSession session, ArtifactRepository remoteRepository )
+        throws WagonRepositoryConnectorException
+    {
+        // CHECKSTYLE_OFF: LineLength
+        RemoteRepository aetherRepo =
+            (RemoteRepository) Invoker.invoke( RepositoryUtils.class, "toRepo",
+                                               org.apache.maven.artifact.repository.ArtifactRepository.class,
+                                               remoteRepository );
+        // CHECKSTYLE_ON: LineLength
+
+        if ( aetherRepo.getAuthentication() == null )
+        {
+            aetherRepo.setAuthentication( session.getAuthenticationSelector().getAuthentication( aetherRepo ) );
+        }
+
+        if ( aetherRepo.getProxy() == null )
+        {
+            aetherRepo.setProxy( session.getProxySelector().getProxy( aetherRepo ) );
+        }
+
+        return aetherRepo;
+    }
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnector.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnector.java
new file mode 100644
index 0000000..98d9689
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnector.java
@@ -0,0 +1,114 @@
+package org.apache.maven.report.projectinfo.wagon.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnector;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorException;
+import org.apache.maven.wagon.TransferFailedException;
+import org.apache.maven.wagon.Wagon;
+import org.apache.maven.wagon.authorization.AuthorizationException;
+import org.apache.maven.wagon.observers.Debug;
+import org.codehaus.plexus.logging.LogEnabled;
+import org.codehaus.plexus.logging.Logger;
+import org.eclipse.aether.spi.connector.RepositoryConnector;
+
+/**
+ * 
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+class Maven31WagonRepositoryConnector implements WagonRepositoryConnector, LogEnabled
+{
+    private Logger logger;
+    
+    private Wagon wagon;
+    
+    Maven31WagonRepositoryConnector( RepositoryConnector connector )
+        throws WagonRepositoryConnectorException
+    {
+        Method pollWagonMethod;
+        try
+        {
+            pollWagonMethod = connector.getClass().getDeclaredMethod( "pollWagon" );
+            wagon = (Wagon) pollWagonMethod.invoke( connector );
+            
+            wagon.setTimeout( 1000 );
+
+            if ( logger.isDebugEnabled() )
+            {
+                Debug debug = new Debug();
+
+                wagon.addSessionListener( debug );
+                wagon.addTransferListener( debug );
+            }
+        }
+        catch ( NoSuchMethodException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( SecurityException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( IllegalAccessException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( IllegalArgumentException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+        catch ( InvocationTargetException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+
+    @Override
+    public boolean resourceExists( String resourceName ) throws TransferFailedException, AuthorizationException
+    {
+        return wagon.resourceExists( resourceName );
+    }
+    
+    @Override
+    public void close()
+    {
+        try
+        {
+            if ( wagon != null )
+            {
+                wagon.disconnect();
+            }
+        }
+        catch ( Exception e )
+        {
+            // too bad
+        }
+    }
+
+    @Override
+    public void enableLogging( Logger logger )
+    {
+        this.logger = logger;
+    }
+}
diff --git a/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnectorFactory.java b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnectorFactory.java
new file mode 100644
index 0000000..05d5a8f
--- /dev/null
+++ b/src/main/java/org/apache/maven/report/projectinfo/wagon/internal/Maven31WagonRepositoryConnectorFactory.java
@@ -0,0 +1,93 @@
+package org.apache.maven.report.projectinfo.wagon.internal;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import org.apache.maven.RepositoryUtils;
+import org.apache.maven.artifact.repository.ArtifactRepository;
+import org.apache.maven.project.ProjectBuildingRequest;
+import org.apache.maven.report.projectinfo.wagon.WagonRepositoryConnectorException;
+import org.codehaus.plexus.component.annotations.Component;
+import org.codehaus.plexus.component.annotations.Requirement;
+import org.eclipse.aether.RepositorySystemSession;
+import org.eclipse.aether.connector.wagon.WagonRepositoryConnectorFactory;
+import org.eclipse.aether.repository.RemoteRepository;
+import org.eclipse.aether.spi.connector.RepositoryConnector;
+import org.eclipse.aether.transfer.NoRepositoryConnectorException;
+
+/**
+ * @author Robert Scholte
+ * @since 3.0.0
+ */
+@Component( role = WagonRepositoryConnectorFactory.class, hint = "maven3" )
+public class Maven31WagonRepositoryConnectorFactory
+{
+    @Requirement( role = WagonRepositoryConnectorFactory.class, hint = "wagon" )
+    private WagonRepositoryConnectorFactory wrcf;
+
+    public Maven31WagonRepositoryConnector newInstance( ProjectBuildingRequest request, ArtifactRepository repository )
+        throws WagonRepositoryConnectorException
+    {
+        try
+        {
+            RepositorySystemSession session =
+                (RepositorySystemSession) Invoker.invoke( request, "getRepositorySession" );
+
+            RemoteRepository remoteRepository = getRemoteRepository( session, repository );
+
+            RepositoryConnector repoConnector = wrcf.newInstance( session, remoteRepository );
+
+            return new Maven31WagonRepositoryConnector( repoConnector );
+        }
+        catch ( NoRepositoryConnectorException e )
+        {
+            throw new WagonRepositoryConnectorException( e.getMessage(), e );
+        }
+    }
+
+    private RemoteRepository getRemoteRepository( RepositorySystemSession session, ArtifactRepository remoteRepository )
+        throws WagonRepositoryConnectorException
+    {
+        // CHECKSTYLE_OFF: LineLength
+        RemoteRepository aetherRepo =
+            (RemoteRepository) Invoker.invoke( RepositoryUtils.class, "toRepo",
+                                               org.apache.maven.artifact.repository.ArtifactRepository.class,
+                                               remoteRepository );
+        // CHECKSTYLE_ON: LineLength
+
+        if ( aetherRepo.getAuthentication() == null || aetherRepo.getProxy() == null )
+        {
+            RemoteRepository.Builder builder = new RemoteRepository.Builder( aetherRepo );
+
+            if ( aetherRepo.getAuthentication() == null )
+            {
+                builder.setAuthentication( session.getAuthenticationSelector().getAuthentication( aetherRepo ) );
+            }
+
+            if ( aetherRepo.getProxy() == null )
+            {
+                builder.setProxy( session.getProxySelector().getProxy( aetherRepo ) );
+            }
+
+            aetherRepo = builder.build();
+        }
+
+        return aetherRepo;
+    }
+}
diff --git a/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java b/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java
index 25cbe2d..4614324 100644
--- a/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java
+++ b/src/test/java/org/apache/maven/report/projectinfo/DependencyConvergenceReportTest.java
@@ -1,5 +1,7 @@
 package org.apache.maven.report.projectinfo;
 
+import java.io.File;
+
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -21,6 +23,8 @@ package org.apache.maven.report.projectinfo;
 
 import java.net.URL;
 
+import org.apache.maven.shared.dependency.graph.DependencyGraphBuilder;
+
 import com.meterware.httpunit.GetMethodWebRequest;
 import com.meterware.httpunit.TextBlock;
 import com.meterware.httpunit.WebConversation;
@@ -73,4 +77,17 @@ public class DependencyConvergenceReportTest
         TextBlock[] textBlocks = response.getTextBlocks();
         assertEquals( getString( "report.dependency-convergence.reactor.name" ), textBlocks[0].getText() );
     }
+    
+    @Override
+    protected AbstractProjectInfoReport createReportMojo( String goal, File pluginXmlFile )
+        throws Exception
+    {
+        AbstractProjectInfoReport mojo = super.createReportMojo( goal, pluginXmlFile );
+
+        // Test is confused because org.eclipse.aether.artifact.Artifact is also on the classpath
+        DependencyGraphBuilder dependencyGraphBuilder = lookup( DependencyGraphBuilder.class, "maven3" );
+        setVariableValueToObject( mojo, "dependencyGraphBuilder", dependencyGraphBuilder );
+        
+        return mojo;
+    }
 }

-- 
To stop receiving notification emails like this one, please contact
rfscholte@apache.org.