Package org.apache.maven.repository.internal

Examples of org.apache.maven.repository.internal.MavenServiceLocator


   }

   public RepositorySystem getRepositorySystem()
   {

      final DefaultServiceLocator locator = new MavenServiceLocator();
      locator.setServices(ModelBuilder.class, new DefaultModelBuilderFactory().newInstance());
      // Installing Wagon to fetch from HTTP repositories
      locator.setServices(WagonProvider.class, new ManualWagonProvider());
      locator.addService(RepositoryConnectorFactory.class, WagonRepositoryConnectorFactory.class);
      final RepositorySystem repositorySystem = locator.getService(RepositorySystem.class);
      return repositorySystem;
   }
View Full Code Here


   }

   public RepositorySystem getRepositorySystem()
   {

      final DefaultServiceLocator locator = new MavenServiceLocator();
      locator.setServices(ModelBuilder.class, new DefaultModelBuilderFactory().newInstance());
      // Installing Wagon to fetch from HTTP repositories
      locator.setServices(WagonProvider.class, new ManualWagonProvider());
      locator.addService(RepositoryConnectorFactory.class, WagonRepositoryConnectorFactory.class);
      final RepositorySystem repositorySystem = locator.getService(RepositorySystem.class);
      return repositorySystem;
   }
View Full Code Here

        session = newSession( repoSystem, localRepo, verbose, offline );
    }

    private ServiceLocator newServiceLocator() {
        MavenServiceLocator locator = new MavenServiceLocator();// when using maven 3.0.4
        //locator.addService( RepositoryConnectorFactory.class, FileRepositoryConnectorFactory.class );
        locator.addService( RepositoryConnectorFactory.class, WagonRepositoryConnectorFactory.class );

        locator.setServices( WagonProvider.class, new ManualWagonProvider() );

        return locator;
    }
View Full Code Here

         * Aether's components implement
         * org.sonatype.aether.spi.locator.Service to ease manual wiring and
         * using the prepopulated DefaultServiceLocator, we only need to
         * register the repository connector factories.
         */
        MavenServiceLocator locator = new MavenServiceLocator();
        locator.addService(RepositoryConnectorFactory.class, FileRepositoryConnectorFactory.class);
        locator.addService(RepositoryConnectorFactory.class, WagonRepositoryConnectorFactory.class);
        locator.setServices(WagonProvider.class, new ManualWagonProvider());

        return locator.getService(RepositorySystem.class);
    }
View Full Code Here

TOP

Related Classes of org.apache.maven.repository.internal.MavenServiceLocator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.