metadata = metadata.setFile( localFile );
result.setMetadata( metadata );
}
else
{
result.setException( new MetadataNotFoundException( metadata, localRepo ) );
}
metadataResolved( session, trace, metadata, localRepo, result.getException() );
continue;
}
List<RemoteRepository> repositories = getEnabledSourceRepositories( repository, metadata.getNature() );
if ( repositories.isEmpty() )
{
continue;
}
metadataResolving( session, trace, metadata, repository );
LocalRepositoryManager lrm = session.getLocalRepositoryManager();
LocalMetadataRequest localRequest =
new LocalMetadataRequest( metadata, repository, request.getRequestContext() );
LocalMetadataResult lrmResult = lrm.find( session, localRequest );
File metadataFile = lrmResult.getFile();
if ( session.isOffline() )
{
if ( metadataFile != null )
{
metadata = metadata.setFile( metadataFile );
result.setMetadata( metadata );
}
else
{
String msg =
"The repository system is offline but the metadata " + metadata + " from " + repository
+ " is not available in the local repository.";
result.setException( new MetadataNotFoundException( metadata, repository, msg ) );
}
metadataResolved( session, trace, metadata, repository, result.getException() );
continue;
}