mirror of https://github.com/apache/maven.git
[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:
parent
aae5e98767
commit
5ad174e3d6
|
@ -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;
|
||||||
|
|
|
@ -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 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
||||||
|
|
|
@ -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 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue