configuration.setLocalRepository( localRepository );
configuration.setRemoteRepositories( remoteRepositories );
configuration.setProcessPlugins( false );
configuration.setValidationLevel( ModelBuildingRequest.VALIDATION_LEVEL_MINIMAL );
MavenSession session = legacySupport.getSession();
if ( session != null )
{
MavenExecutionRequest request = session.getRequest();
if ( request != null )
{
configuration.setServers( request.getServers() );
configuration.setMirrors( request.getMirrors() );
configuration.setProxies( request.getProxies() );
configuration.setTransferListener( request.getTransferListener() );
configuration.setForceUpdate( request.isUpdateSnapshots() );
}
configuration.setOffline( session.isOffline() );
configuration.setSystemProperties( session.getSystemProperties() );
configuration.setUserProperties( session.getUserProperties() );
}
else
{
configuration.setSystemProperties( System.getProperties() );
}