artifactResolved( session, trace, artifact, result.getRepository(), null );
continue;
}
}
LocalArtifactResult local =
lrm.find( session, new LocalArtifactRequest( artifact, repos, request.getRequestContext() ) );
if ( local.isAvailable()
|| ( local.getFile() != null && versionResult.getRepository() instanceof LocalRepository ) )
{
if ( local.getRepository() != null )
{
result.setRepository( local.getRepository() );
}
else
{
result.setRepository( lrm.getRepository() );
}
try
{
artifact = artifact.setFile( getFile( session, artifact, local.getFile() ) );
result.setArtifact( artifact );
artifactResolved( session, trace, artifact, result.getRepository(), null );
}
catch ( ArtifactTransferException e )
{
result.addException( e );
}
if ( !local.isAvailable() )
{
/*
* NOTE: Interop with Maven 2.x: An artifact installed by Maven 2.x will not show up in the
* repository tracking file of the local repository. If however the maven-metadata-local.xml tells
* us the artifact was installed, we sync the repository tracking file.
*/
lrm.add( session, new LocalArtifactRegistration( artifact ) );
}
continue;
}
else if ( local.getFile() != null )
{
logger.debug( "Verifying availability of " + local.getFile() + " from " + repos );
}
if ( session.isOffline() )
{
Exception exception =