[MNG-4247] Displaying which artifacts are downloaded and from which repo

Only displaying a simple : [INFO] Downloaded http://x.x.x.x:x/....... 
As there is so much places where ArtifactResolutionRequest is created without any access to mavenExecutionRequest.getTransferListener()
Issue id: MNG-4247


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@797678 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Olivier Lamy 2009-07-24 22:37:39 +00:00
parent aae5e98767
commit 5ad174e3d6
8 changed files with 23 additions and 6 deletions

View File

@ -43,6 +43,11 @@ public class ArtifactResolutionRequest
private boolean resolveTransitively = false; private boolean resolveTransitively = false;
public ArtifactResolutionRequest( )
{
// nothing here
}
public Artifact getArtifact() public Artifact getArtifact()
{ {
return artifact; return artifact;

View File

@ -346,6 +346,9 @@ public class DefaultWagonManager
if ( downloaded ) if ( downloaded )
{ {
logger.info( "Downloaded " + repository.getUrl() + remotePath );
// keep the checksum files from showing up on the download monitor... // keep the checksum files from showing up on the download monitor...
if ( downloadMonitor != null ) if ( downloadMonitor != null )
{ {

View File

@ -81,6 +81,7 @@ public class DefaultProjectDependenciesResolver
.setRemoteRepostories( remoteRepositories ) .setRemoteRepostories( remoteRepositories )
.setManagedVersionMap( project.getManagedVersionMap() ) .setManagedVersionMap( project.getManagedVersionMap() )
.setFilter( filter ); .setFilter( filter );
// FIXME setTransferListener
ArtifactResolutionResult result = repositorySystem.resolve( request ); ArtifactResolutionResult result = repositorySystem.resolve( request );
resolutionErrorHandler.throwErrors( request, result ); resolutionErrorHandler.throwErrors( request, result );

View File

@ -133,7 +133,7 @@ public class DefaultPluginManager
.setLocalRepository( localRepository ) .setLocalRepository( localRepository )
.setRemoteRepostories( remoteRepositories ) .setRemoteRepostories( remoteRepositories )
.setResolveTransitively( false ); .setResolveTransitively( false );
// FIXME setTransferListener
ArtifactResolutionResult result = repositorySystem.resolve( request ); ArtifactResolutionResult result = repositorySystem.resolve( request );
try try
@ -275,6 +275,7 @@ public class DefaultPluginManager
.setFilter( filter ) .setFilter( filter )
.setResolveTransitively( true ); .setResolveTransitively( true );
//.setResolveRoot( false ); //.setResolveRoot( false );
// FIXME setTransferListener
ArtifactResolutionResult result = repositorySystem.resolve( request ); ArtifactResolutionResult result = repositorySystem.resolve( request );
resolutionErrorHandler.throwErrors( request, result ); resolutionErrorHandler.throwErrors( request, result );

View File

@ -231,7 +231,7 @@ public class DefaultProjectBuilder
.setArtifact( artifact ) .setArtifact( artifact )
.setLocalRepository( configuration.getLocalRepository() ) .setLocalRepository( configuration.getLocalRepository() )
.setRemoteRepostories( configuration.getRemoteRepositories() ); .setRemoteRepostories( configuration.getRemoteRepositories() );
// FIXME setTransferListener
ArtifactResolutionResult result = repositorySystem.resolve( request ); ArtifactResolutionResult result = repositorySystem.resolve( request );
try try
@ -307,7 +307,7 @@ public class DefaultProjectBuilder
.setLocalRepository( request.getLocalRepository() ) .setLocalRepository( request.getLocalRepository() )
.setRemoteRepostories( project.getRemoteArtifactRepositories() ) .setRemoteRepostories( project.getRemoteArtifactRepositories() )
.setManagedVersionMap( project.getManagedVersionMap() ); .setManagedVersionMap( project.getManagedVersionMap() );
// FIXME setTransferListener
ArtifactResolutionResult result; ArtifactResolutionResult result;
ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader(); ClassLoader oldContextClassLoader = Thread.currentThread().getContextClassLoader();

View File

@ -187,6 +187,7 @@ public class DefaultProjectBuildingHelper
request.setFilter( artifactFilterManager.getCoreArtifactFilter() ); request.setFilter( artifactFilterManager.getCoreArtifactFilter() );
request.setLocalRepository( localRepository ); request.setLocalRepository( localRepository );
request.setRemoteRepostories( remoteRepositories ); request.setRemoteRepostories( remoteRepositories );
// FIXME setTransferListener
ArtifactResolutionResult result = repositorySystem.resolve( request ); ArtifactResolutionResult result = repositorySystem.resolve( request );

View File

@ -23,9 +23,11 @@ import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import org.apache.maven.MavenTransferListener;
import org.apache.maven.artifact.repository.ArtifactRepository; import org.apache.maven.artifact.repository.ArtifactRepository;
import org.apache.maven.model.Profile; import org.apache.maven.model.Profile;
import org.apache.maven.model.building.ModelBuildingRequest; import org.apache.maven.model.building.ModelBuildingRequest;
import org.apache.maven.wagon.events.TransferListener;
public interface ProjectBuildingRequest public interface ProjectBuildingRequest
{ {
@ -141,4 +143,8 @@ public interface ProjectBuildingRequest
*/ */
void setBuildStartTime( Date buildStartTime ); void setBuildStartTime( Date buildStartTime );
// TODO ?
//TransferListener getTransferListener();
//void setTransferListener ( TransferListener transferListener );
} }

View File

@ -116,7 +116,7 @@ class RepositoryModelResolver
request.setArtifact( artifactParent ); request.setArtifact( artifactParent );
request.setLocalRepository( localRepository ); request.setLocalRepository( localRepository );
request.setRemoteRepostories( remoteRepositories ); request.setRemoteRepostories( remoteRepositories );
// FIXME setTransferListener
ArtifactResolutionResult result = repositorySystem.resolve( request ); ArtifactResolutionResult result = repositorySystem.resolve( request );
try try