@Test( expected = InstallationException.class ) public void testArtifactExistsAsDir() throws InstallationException { String path = session.getLocalRepositoryManager().getPathForLocalArtifact( artifact ); File file = new File( session.getLocalRepository().getBasedir(), path ); assertFalse( file.getAbsolutePath() + " is a file, not directory", file.isFile() ); assertFalse( file.getAbsolutePath() + " already exists", file.exists() ); assertTrue( "failed to setup test: could not create " + file.getAbsolutePath(), file.mkdirs() || file.isDirectory() ); request.addArtifact( artifact ); installer.install( session, request ); }
public InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { return install( syncContext, session, request ); } finally { syncContext.release(); } }
DefaultInstaller implements Installer, Service { public InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { return install( syncContext, session, request ); } finally { syncContext.release(); } } }
DefaultInstaller implements Installer, Service { public InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { return install( syncContext, session, request ); } finally { syncContext.release(); } } DefaultInstaller();  DefaultInstaller( Logger logger, FileProcessor fileProcessor,
                             RepositoryEventDispatcher repositoryEventDispatcher,
                             List<MetadataGeneratorFactory> metadataFactories, SyncContextFactory syncContextFactory ); }
DefaultInstaller implements Installer, Service { public InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { return install( syncContext, session, request ); } finally { syncContext.release(); } } DefaultInstaller();  DefaultInstaller( Logger logger, FileProcessor fileProcessor,
                             RepositoryEventDispatcher repositoryEventDispatcher,
                             List<MetadataGeneratorFactory> metadataFactories, SyncContextFactory syncContextFactory ); void initService( ServiceLocator locator ); DefaultInstaller setLogger( Logger logger ); DefaultInstaller setFileProcessor( FileProcessor fileProcessor ); DefaultInstaller setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ); DefaultInstaller addMetadataGeneratorFactory( MetadataGeneratorFactory factory ); DefaultInstaller setMetadataFactories( List<MetadataGeneratorFactory> metadataFactories ); DefaultInstaller setSyncContextFactory( SyncContextFactory syncContextFactory ); InstallResult install( RepositorySystemSession session, InstallRequest request ); }
DefaultInstaller implements Installer, Service { public InstallResult install( RepositorySystemSession session, InstallRequest request ) throws InstallationException { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { return install( syncContext, session, request ); } finally { syncContext.release(); } } DefaultInstaller();  DefaultInstaller( Logger logger, FileProcessor fileProcessor,
                             RepositoryEventDispatcher repositoryEventDispatcher,
                             List<MetadataGeneratorFactory> metadataFactories, SyncContextFactory syncContextFactory ); void initService( ServiceLocator locator ); DefaultInstaller setLogger( Logger logger ); DefaultInstaller setFileProcessor( FileProcessor fileProcessor ); DefaultInstaller setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ); DefaultInstaller addMetadataGeneratorFactory( MetadataGeneratorFactory factory ); DefaultInstaller setMetadataFactories( List<MetadataGeneratorFactory> metadataFactories ); DefaultInstaller setSyncContextFactory( SyncContextFactory syncContextFactory ); InstallResult install( RepositorySystemSession session, InstallRequest request );  }