public LocalRepositoryManager localRepositoryManager ( final RepositorySystemSession session , boolean legacyLocalRepository ) { Validate . notNull ( session , "session must be specified" ) ; String localRepositoryPath = settings . getLocalRepository ( ) ; Validate . notNullOrEmpty ( localRepositoryPath , "Path to a local repository must be defined" ) ; SWRLocalRepositoryManager factory = SWRLocalRepositoryManager . ENHANCED ; // here we rely either on system property or flag passed by caller if ( useLegacyLocalRepository || legacyLocalRepository ) { factory = SWRLocalRepositoryManager . LEGACY ; } if ( settings . isOffline ( ) ) { factory = SWRLocalRepositoryManager . SIMPLE ; } LocalRepositoryManager manager = factory . localRepositoryManager ( system , session , new File ( localRepositoryPath ) ) ; return manager ; }
Gets manager for local repository