Package org.sonatype.aether.repository

Examples of org.sonatype.aether.repository.LocalRepository


                    // code getting to this point means we'll be using Aether to resolve stuff
                    System.out.println("Checking for SDK updates...");

                    if (LOCAL_REPOSITORY!=null)
                        injector.getInstance(LocalRepositorySetting.class).set(
                                new LocalRepository(new File(LOCAL_REPOSITORY))
                        );

                    rs = injector.getInstance(RepositoryService.class);
                }
                return rs;
View Full Code Here


    {
        ArtifactRepositoryLayout layout = repository.getLayout();
        if ( layout != null && layout.getClass().equals( DefaultRepositoryLayout.class ) )
        {
            // map the default layout to the default impl of the repo system
            return system.newLocalRepositoryManager( new LocalRepository( repository.getBasedir() ) );
        }

        return new LegacyLocalRepositoryManager( repository );
    }
View Full Code Here

        }
        this.delegate = delegate;

        ArtifactRepositoryLayout layout = delegate.getLayout();
        repo =
            new LocalRepository( new File( delegate.getBasedir() ),
                                 ( layout != null ) ? layout.getClass().getSimpleName() : "legacy" );
    }
View Full Code Here

   {
      MavenRepositorySystemSession session = new MavenRepositorySystemSession();
      session.setOffline(!environment.isOnline());
      Settings settings = container.getSettings();

      LocalRepository localRepo = new LocalRepository(new File(settings.getLocalRepository()), "");
      session.setLocalRepositoryManager(repoSystem.newLocalRepositoryManager(localRepo));
      session.setTransferErrorCachingEnabled(false);
      session.setNotFoundCachingEnabled(false);

      return session;
View Full Code Here

    private static RepositorySystemSession newRepositorySystemSession() {

        MavenRepositorySystemSession session = new MavenRepositorySystemSession();

        //TODO make local repo more pluggable?
        LocalRepository localRepo = new LocalRepository(determineLocalMavenRepositoryHack());
        session.setLocalRepositoryManager( REPOSITORY_SYSTEM.newLocalRepositoryManager(localRepo));

        //Copy these from the aether demo if they are nice to have
        session.setTransferListener(new ConsoleTransferListener());
        session.setRepositoryListener(new ConsoleRepositoryListener());
View Full Code Here

   {
      MavenRepositorySystemSession session = new MavenRepositorySystemSession();
      session.setOffline(!environment.isOnline());
      Settings settings = container.getSettings();

      LocalRepository localRepo = new LocalRepository(new File(settings.getLocalRepository()), "");
      session.setLocalRepositoryManager(repoSystem.newLocalRepositoryManager(localRepo));
      session.setTransferErrorCachingEnabled(false);
      session.setNotFoundCachingEnabled(false);

      return session;
View Full Code Here

        if (localRepository == null) {
            // Try to get local repository from settings.xml
            MavenDependencyResolverSettings resolverSettings = new MavenDependencyResolverSettings();
            String localRepositoryName = resolverSettings.getSettings().getLocalRepository();
            if (localRepositoryName != null)
                localRepository = new LocalRepository(new File(localRepositoryName));
            else
                localRepository = new LocalRepository(new File(new File(System.getProperty("user.home")), ".m2/repository"));
        }
        return localRepository;
    }
View Full Code Here

                    // code getting to this point means we'll be using Aether to resolve stuff
                    System.out.println("Updating Bees SDK. This may take a while");

                    if (LOCAL_REPOSITORY!=null)
                        injector.getInstance(LocalRepositorySetting.class).set(
                                new LocalRepository(new File(LOCAL_REPOSITORY))
                        );

                    rs = injector.getInstance(RepositoryService.class);
                }
                return rs;
View Full Code Here

     * Create RepositorySystemSession.
     *
     * @return The session
     */
    private RepositorySystemSession session() {
        final LocalRepository local = new LocalRepository(this.localRepo);
        final MavenRepositorySystemSession session =
            new MavenRepositorySystemSession();
        session.setLocalRepositoryManager(
            this.system.newLocalRepositoryManager(local)
        );
View Full Code Here

   private MavenRepositorySystemSession setupRepoSession(final RepositorySystem repoSystem)
   {
      MavenRepositorySystemSession session = new MavenRepositorySystemSession();
      session.setOffline(!environment.isOnline());

      LocalRepository localRepo = new LocalRepository(container.getSettings().getLocalRepository());
      session.setLocalRepositoryManager(repoSystem.newLocalRepositoryManager(localRepo));

      session.setTransferErrorCachingEnabled(false);
      session.setNotFoundCachingEnabled(false);
      return session;
View Full Code Here

TOP

Related Classes of org.sonatype.aether.repository.LocalRepository

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.