maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bentm...@apache.org
Subject svn commit: r825494 - in /maven/maven-3/trunk: maven-compat/src/main/java/org/apache/maven/artifact/repository/ maven-compat/src/main/java/org/apache/maven/artifact/resolver/ maven-compat/src/main/java/org/apache/maven/repository/legacy/ maven-compat/s...
Date Thu, 15 Oct 2009 13:40:25 GMT
Author: bentmann
Date: Thu Oct 15 13:40:24 2009
New Revision: 825494

URL: http://svn.apache.org/viewvc?rev=825494&view=rev
Log:
o Added transfer listener for further downloads

Modified:
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/RepositoryRequest.java
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java
    maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java
(original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/DefaultRepositoryRequest.java
Thu Oct 15 13:40:24 2009
@@ -22,6 +22,8 @@
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.maven.repository.ArtifactTransferListener;
+
 /**
  * Collects basic settings to access the repository system.
  * 
@@ -41,6 +43,8 @@
 
     private RepositoryCache cache;
 
+    private ArtifactTransferListener transferListener;
+
     /**
      * Creates an empty repository request.
      */
@@ -61,6 +65,7 @@
         setOffline( repositoryRequest.isOffline() );
         setCache( repositoryRequest.getCache() );
         setForceUpdate( repositoryRequest.isForceUpdate() );
+        setTransferListener( repositoryRequest.getTransferListener() );
     }
 
     public boolean isOffline()
@@ -128,4 +133,16 @@
         return this;
     }
 
+    public ArtifactTransferListener getTransferListener()
+    {
+        return transferListener;
+    }
+
+    public DefaultRepositoryRequest setTransferListener( ArtifactTransferListener transferListener
)
+    {
+        this.transferListener = transferListener;
+
+        return this;
+    }
+
 }

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/RepositoryRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/RepositoryRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/RepositoryRequest.java
(original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/repository/RepositoryRequest.java
Thu Oct 15 13:40:24 2009
@@ -21,6 +21,8 @@
 
 import java.util.List;
 
+import org.apache.maven.repository.ArtifactTransferListener;
+
 /**
  * Collects basic settings to access the repository system.
  * 
@@ -107,4 +109,19 @@
      */
     RepositoryRequest setCache( RepositoryCache cache );
 
+    /**
+     * Gets the listener to notify of transfer events.
+     * 
+     * @return The transfer listener or {@code null} if none.
+     */
+    ArtifactTransferListener getTransferListener();
+
+    /**
+     * Sets the listener to notify of transfer events.
+     * 
+     * @param transferListener The transfer listener to notify, may be {@code null}.
+     * @return This request, never {@code null}.
+     */
+    RepositoryRequest setTransferListener( ArtifactTransferListener transferListener );
+
 }

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
(original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/ArtifactResolutionRequest.java
Thu Oct 15 13:40:24 2009
@@ -29,7 +29,7 @@
 import org.apache.maven.artifact.repository.RepositoryCache;
 import org.apache.maven.artifact.repository.RepositoryRequest;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.wagon.events.TransferListener;
+import org.apache.maven.repository.ArtifactTransferListener;
 
 /**
  * A resolution request allows you to either use an existing MavenProject, or a coordinate
(gid:aid:version)
@@ -64,7 +64,7 @@
     // This is like a filter but overrides all transitive versions 
     private Map managedVersionMap;
 
-    private TransferListener transferListener;
+    private ArtifactTransferListener transferListener;
     
     private boolean resolveRoot = true;
 
@@ -86,6 +86,7 @@
         setCache( request.getCache() );
         setOffline( request.isOffline() );
         setForceUpdate( request.isForceUpdate() );
+        setTransferListener( request.getTransferListener() );
     }
 
     public Artifact getArtifact()
@@ -228,12 +229,12 @@
         return resolveTransitively;
     }        
     
-    public TransferListener getTransferListener()
+    public ArtifactTransferListener getTransferListener()
     {
         return transferListener;
     }
 
-    public ArtifactResolutionRequest setTransferListener( TransferListener transferListener
)
+    public ArtifactResolutionRequest setTransferListener( ArtifactTransferListener transferListener
)
     {
         this.transferListener = transferListener;
         return this;

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
(original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/resolver/DefaultArtifactResolver.java
Thu Oct 15 13:40:24 2009
@@ -38,6 +38,7 @@
 import org.apache.maven.artifact.repository.metadata.SnapshotArtifactRepositoryMetadata;
 import org.apache.maven.artifact.repository.metadata.Versioning;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
+import org.apache.maven.repository.legacy.TransferListenerAdapter;
 import org.apache.maven.repository.legacy.WagonManager;
 import org.apache.maven.repository.legacy.metadata.ArtifactMetadata;
 import org.apache.maven.repository.legacy.metadata.DefaultMetadataResolutionRequest;
@@ -370,7 +371,8 @@
         Map managedVersions = request.getManagedVersionMap();
         List<ResolutionListener> listeners = request.getListeners();
         ArtifactFilter collectionFilter = request.getCollectionFilter();                
      
-        ArtifactFilter resolutionFilter = request.getResolutionFilter();                
      
+        ArtifactFilter resolutionFilter = request.getResolutionFilter();
+        TransferListener transferListener = TransferListenerAdapter.newAdapter( request.getTransferListener()
);
         
         //TODO: hack because metadata isn't generated in m2e correctly and i want to run
the maven i have in the workspace
         if ( source == null )
@@ -408,7 +410,7 @@
         {            
             try
             {
-                resolve( rootArtifact, request, request.getTransferListener(), false );
+                resolve( rootArtifact, request, transferListener, false );
             }
             catch ( ArtifactResolutionException e )
             {
@@ -512,7 +514,7 @@
                     {
                         childRequest.setRemoteRepositories( node.getRemoteRepositories()
);
 
-                        resolve( artifact, childRequest, request.getTransferListener(), false
);
+                        resolve( artifact, childRequest, transferListener, false );
                     }
                 }
                 catch ( ArtifactNotFoundException anfe )

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
(original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/DefaultWagonManager.java
Thu Oct 15 13:40:24 2009
@@ -306,12 +306,6 @@
 
                 if ( downloaded )
                 {
-                    if ( logger.isInfoEnabled() )
-                    {
-                        String url = String.valueOf( repository.getUrl() );
-                        logger.info( "Downloaded " + url + ( url.endsWith( "/" ) ? "" : "/"
) + remotePath );
-                    }
-
                     // keep the checksum files from showing up on the download monitor...
                     if ( downloadMonitor != null )
                     {

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java
(original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/repository/legacy/metadata/DefaultMetadataResolutionRequest.java
Thu Oct 15 13:40:24 2009
@@ -26,6 +26,7 @@
 import org.apache.maven.artifact.repository.DefaultRepositoryRequest;
 import org.apache.maven.artifact.repository.RepositoryCache;
 import org.apache.maven.artifact.repository.RepositoryRequest;
+import org.apache.maven.repository.ArtifactTransferListener;
 
 /**
  * Forms a request to retrieve artifact metadata.
@@ -136,4 +137,16 @@
         return this;
     }
 
+    public ArtifactTransferListener getTransferListener()
+    {
+        return repositoryRequest.getTransferListener();
+    }
+
+    public DefaultMetadataResolutionRequest setTransferListener( ArtifactTransferListener
transferListener )
+    {
+        repositoryRequest.setTransferListener( transferListener );
+
+        return this;
+    }
+
 }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/DefaultProjectDependenciesResolver.java
Thu Oct 15 13:40:24 2009
@@ -39,7 +39,6 @@
 import org.apache.maven.project.MavenProject;
 import org.apache.maven.project.artifact.ProjectArtifact;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.legacy.TransferListenerAdapter;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 
@@ -136,7 +135,7 @@
             .setOffline( session.isOffline() )
             .setForceUpdate( session.getRequest().isUpdateSnapshots() )
             .setCache( session.getRepositoryCache() );
-        request.setTransferListener( TransferListenerAdapter.newAdapter( session.getRequest().getTransferListener()
) );
+        request.setTransferListener( session.getRequest().getTransferListener() );
 
         Set<String> projectIds = null;
 

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/lifecycle/DefaultLifecycleExecutor.java
Thu Oct 15 13:40:24 2009
@@ -966,6 +966,7 @@
             request.setRemoteRepositories( project.getPluginArtifactRepositories() );
         }
         request.setOffline( session.isOffline() );
+        request.setTransferListener( session.getRequest().getTransferListener() );
 
         return request;
     }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java
Thu Oct 15 13:40:24 2009
@@ -344,6 +344,7 @@
         request.setRemoteRepositories( project.getPluginArtifactRepositories() );
         request.setCache( session.getRepositoryCache() );
         request.setOffline( session.isOffline() );
+        request.setTransferListener( session.getRequest().getTransferListener() );
 
         List<Artifact> pluginArtifacts =
             resolvePluginArtifacts( plugin, pluginArtifact, request, project.getExtensionArtifactFilter()
);

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/DefaultPluginPrefixRequest.java
Thu Oct 15 13:40:24 2009
@@ -29,6 +29,7 @@
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Model;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.repository.ArtifactTransferListener;
 
 /**
  * Collects settings required to resolve a plugin prefix.
@@ -82,6 +83,7 @@
         setCache( session.getRepositoryCache() );
         setLocalRepository( session.getLocalRepository() );
         setOffline( session.isOffline() );
+        setTransferListener( session.getRequest().getTransferListener() );
 
         MavenProject project = session.getCurrentProject();
         if ( project != null )
@@ -194,4 +196,16 @@
         return this;
     }
 
+    public ArtifactTransferListener getTransferListener()
+    {
+        return repositoryRequest.getTransferListener();
+    }
+
+    public DefaultPluginPrefixRequest setTransferListener( ArtifactTransferListener transferListener
)
+    {
+        repositoryRequest.setTransferListener( transferListener );
+
+        return this;
+    }
+
 }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/PluginPrefixRequest.java
Thu Oct 15 13:40:24 2009
@@ -25,6 +25,7 @@
 import org.apache.maven.artifact.repository.RepositoryCache;
 import org.apache.maven.artifact.repository.RepositoryRequest;
 import org.apache.maven.model.Model;
+import org.apache.maven.repository.ArtifactTransferListener;
 
 /**
  * Collects settings required to resolve a plugin prefix.
@@ -143,4 +144,19 @@
      */
     PluginPrefixRequest setCache( RepositoryCache cache );
 
+    /**
+     * Gets the listener to notify of transfer events.
+     * 
+     * @return The transfer listener or {@code null} if none.
+     */
+    ArtifactTransferListener getTransferListener();
+
+    /**
+     * Sets the listener to notify of transfer events.
+     * 
+     * @param transferListener The transfer listener to notify, may be {@code null}.
+     * @return This request, never {@code null}.
+     */
+    PluginPrefixRequest setTransferListener( ArtifactTransferListener transferListener );
+
 }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/prefix/internal/DefaultPluginPrefixResolver.java
Thu Oct 15 13:40:24 2009
@@ -171,7 +171,7 @@
 
                     try
                     {
-                        repositorySystem.retrieve( repository, destination, remotePath, null
);
+                        repositorySystem.retrieve( repository, destination, remotePath, request.getTransferListener()
);
                     }
                     catch ( ArtifactTransferFailedException e )
                     {

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/DefaultPluginVersionRequest.java
Thu Oct 15 13:40:24 2009
@@ -28,6 +28,7 @@
 import org.apache.maven.execution.MavenSession;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
+import org.apache.maven.repository.ArtifactTransferListener;
 
 /**
  * Collects settings required to resolve the version for a plugin.
@@ -91,6 +92,7 @@
         setCache( session.getRepositoryCache() );
         setLocalRepository( session.getLocalRepository() );
         setOffline( session.isOffline() );
+        setTransferListener( session.getRequest().getTransferListener() );
 
         MavenProject project = session.getCurrentProject();
         if ( project != null )
@@ -183,4 +185,16 @@
         return this;
     }
 
+    public ArtifactTransferListener getTransferListener()
+    {
+        return repositoryRequest.getTransferListener();
+    }
+
+    public DefaultPluginVersionRequest setTransferListener( ArtifactTransferListener transferListener
)
+    {
+        repositoryRequest.setTransferListener( transferListener );
+
+        return this;
+    }
+
 }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/PluginVersionRequest.java
Thu Oct 15 13:40:24 2009
@@ -24,6 +24,7 @@
 import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.repository.RepositoryCache;
 import org.apache.maven.artifact.repository.RepositoryRequest;
+import org.apache.maven.repository.ArtifactTransferListener;
 
 /**
  * Collects settings required to resolve the version for a plugin.
@@ -125,4 +126,19 @@
      */
     PluginVersionRequest setCache( RepositoryCache cache );
 
+    /**
+     * Gets the listener to notify of transfer events.
+     * 
+     * @return The transfer listener or {@code null} if none.
+     */
+    ArtifactTransferListener getTransferListener();
+
+    /**
+     * Sets the listener to notify of transfer events.
+     * 
+     * @param transferListener The transfer listener to notify, may be {@code null}.
+     * @return This request, never {@code null}.
+     */
+    PluginVersionRequest setTransferListener( ArtifactTransferListener transferListener );
+
 }

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/plugin/version/internal/DefaultPluginVersionResolver.java
Thu Oct 15 13:40:24 2009
@@ -84,7 +84,8 @@
 
                 try
                 {
-                    repositorySystem.retrieve( repository, artifactMetadataFile, remotePath,
null );
+                    repositorySystem.retrieve( repository, artifactMetadataFile, remotePath,
+                                               request.getTransferListener() );
                 }
                 catch ( ArtifactTransferFailedException e )
                 {

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/DefaultProjectBuilder.java
Thu Oct 15 13:40:24 2009
@@ -42,7 +42,6 @@
 import org.apache.maven.model.resolution.ModelResolver;
 import org.apache.maven.project.artifact.ProjectArtifact;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.legacy.TransferListenerAdapter;
 import org.codehaus.plexus.component.annotations.Component;
 import org.codehaus.plexus.component.annotations.Requirement;
 import org.codehaus.plexus.util.Os;
@@ -143,7 +142,7 @@
                     .setOffline( configuration.isOffline() )
                     .setForceUpdate( configuration.isForceUpdate() )
                     .setManagedVersionMap( project.getManagedVersionMap() );
-                artifactRequest.setTransferListener( TransferListenerAdapter.newAdapter(
configuration.getTransferListener() ) );
+                artifactRequest.setTransferListener( configuration.getTransferListener()
);
 
                 artifactResult = repositorySystem.resolve( artifactRequest );
 
@@ -206,7 +205,7 @@
             .setRemoteRepositories( configuration.getRemoteRepositories() )
             .setOffline( configuration.isOffline() )
             .setForceUpdate( configuration.isForceUpdate() );
-        request.setTransferListener( TransferListenerAdapter.newAdapter( configuration.getTransferListener()
) );
+        request.setTransferListener( configuration.getTransferListener() );
 
         ArtifactResolutionResult result = repositorySystem.resolve( request );
 

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/RepositoryModelResolver.java
Thu Oct 15 13:40:24 2009
@@ -37,7 +37,6 @@
 import org.apache.maven.model.resolution.ModelResolver;
 import org.apache.maven.model.resolution.UnresolvableModelException;
 import org.apache.maven.repository.RepositorySystem;
-import org.apache.maven.repository.legacy.TransferListenerAdapter;
 
 /**
  * Implements a model resolver backed by the Maven Repository API and the reactor.
@@ -137,7 +136,7 @@
             request.setLocalRepository( projectBuildingRequest.getLocalRepository() );
             request.setOffline( projectBuildingRequest.isOffline() );
             request.setCache( projectBuildingRequest.getRepositoryCache() );
-            request.setTransferListener( TransferListenerAdapter.newAdapter( projectBuildingRequest.getTransferListener()
) );
+            request.setTransferListener( projectBuildingRequest.getTransferListener() );
 
             ArtifactResolutionResult result = repositorySystem.resolve( request );
 

Modified: maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java?rev=825494&r1=825493&r2=825494&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
(original)
+++ maven/maven-3/trunk/maven-core/src/main/java/org/apache/maven/project/artifact/MavenMetadataSource.java
Thu Oct 15 13:40:24 2009
@@ -542,6 +542,7 @@
                     configuration.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL
);
                     configuration.setProcessPlugins( false );
                     configuration.setSystemProperties( System.getProperties() );
+                    configuration.setTransferListener( repositoryRequest.getTransferListener()
);
 
                     project = getProjectBuilder().build( pomArtifact, configuration ).getProject();
                 }



Mime
View raw message