Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,9 @@ else if ( exception == null )
session.getLocalRepositoryManager().getPathForRemoteMetadata(
metadata, request.getRepository(), request.getRequestContext() ) );

metadataDownloading(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this could appear later, but doesn't really matter for the moment.

session, trace, result.getRequest().getMetadata(), result.getRequest().getRepository() );

ResolveTask task =
new ResolveTask( session, trace, result, installFile, checks, policy.getChecksumPolicy() );
tasks.add( task );
Expand Down Expand Up @@ -356,6 +359,19 @@ else if ( exception == null )

for ( ResolveTask task : tasks )
{
/*
* NOTE: Touch after registration with local repo to ensure concurrent resolution is not
* rejected with "already updated" via session data when actual update to local repo is
* still pending.
*/
for ( UpdateCheck<Metadata, MetadataTransferException> check : task.checks )
{
updateCheckManager.touchMetadata( task.session, check.setException( task.exception ) );
}

metadataDownloaded( session, task.trace, task.request.getMetadata(), task.request.getRepository(),
task.metadataFile, task.exception );

task.result.setException( task.exception );
}
}
Expand Down Expand Up @@ -515,7 +531,6 @@ private void shutdown( Executor executor )
class ResolveTask
implements Runnable
{

final RepositorySystemSession session;

final RequestTrace trace;
Expand Down Expand Up @@ -550,8 +565,6 @@ public void run()
Metadata metadata = request.getMetadata();
RemoteRepository requestRepository = request.getRepository();

metadataDownloading( session, trace, metadata, requestRepository );

try
{
List<RemoteRepository> repositories = new ArrayList<>();
Expand Down Expand Up @@ -595,19 +608,6 @@ else if ( request.isDeleteLocalCopyIfMissing() && exception instanceof MetadataN
{
exception = new MetadataTransferException( metadata, requestRepository, e );
}

/*
* NOTE: Touch after registration with local repo to ensure concurrent resolution is not rejected with
* "already updated" via session data when actual update to local repo is still pending.
*/
for ( UpdateCheck<Metadata, MetadataTransferException> check : checks )
{
updateCheckManager.touchMetadata( session, check.setException( exception ) );
}

metadataDownloaded( session, trace, metadata, requestRepository, metadataFile, exception );
}

}

}