Examples of LocalRepositoryManager


Examples of org.eclipse.aether.repository.LocalRepositoryManager

  public void apply(DefaultRepositorySystemSession session,
      RepositorySystem repositorySystem) {

    if (session.getLocalRepositoryManager() == null) {
      LocalRepository localRepository = new LocalRepository(getM2RepoDirectory());
      LocalRepositoryManager localRepositoryManager = repositorySystem
          .newLocalRepositoryManager(session, localRepository);
      session.setLocalRepositoryManager(localRepositoryManager);
    }

    ProxySelector existing = session.getProxySelector();
View Full Code Here

Examples of org.eclipse.aether.repository.LocalRepositoryManager

        {
            RepositoryUtils.toArtifacts( artifacts, resolutionResult.getDependencyGraph().getChildren(),
                                         Collections.singletonList( project.getArtifact().getId() ), null );

            // Maven 2.x quirk: an artifact always points at the local repo, regardless whether resolved or not
            LocalRepositoryManager lrm = session.getLocalRepositoryManager();
            for ( Artifact artifact : artifacts )
            {
                if ( !artifact.isResolved() )
                {
                    String path = lrm.getPathForLocalArtifact( RepositoryUtils.toArtifact( artifact ) );
                    artifact.setFile( new File( lrm.getRepository().getBasedir(), path ) );
                }
            }
        }
        project.setResolvedArtifacts( artifacts );
        project.setArtifacts( artifacts );
View Full Code Here

Examples of org.eclipse.aether.repository.LocalRepositoryManager

                ArtifactRequest artifactRequest = new ArtifactRequest();
                artifactRequest.setArtifact( RepositoryUtils.toArtifact( artifact ) );
                artifactRequest.setRepositories( RepositoryUtils.toRepos( remoteRepositories ) );

                // Maven 2.x quirk: an artifact always points at the local repo, regardless whether resolved or not
                LocalRepositoryManager lrm = session.getLocalRepositoryManager();
                String path = lrm.getPathForLocalArtifact( artifactRequest.getArtifact() );
                artifact.setFile( new File( lrm.getRepository().getBasedir(), path ) );

                result = repoSystem.resolveArtifact( session, artifactRequest );
            }
            catch ( org.eclipse.aether.resolution.ArtifactResolutionException e )
            {
View Full Code Here

Examples of org.eclipse.aether.repository.LocalRepositoryManager

        return result;
    }

    public void install(String coordinate, String file) throws InstallationException{
        LocalRepositoryManager lrm = getSession().getLocalRepositoryManager();

        Artifact artifact = new DefaultArtifact(coordinate);
       
        File dstFile = new File( lrm.getRepository().getBasedir(), lrm.getPathForLocalArtifact( artifact ) );
        if (!dstFile.exists() ){
            artifact = artifact.setFile(new File(file));
            InstallRequest request = new InstallRequest();
            request.addArtifact(artifact);
            installer.install(getSession(), request);
View Full Code Here

Examples of org.openrdf.repository.manager.LocalRepositoryManager

    if (!dir.exists() || !dir.isDirectory()) {
      writeError("Specified path is not an (existing) directory: " + path);
      return false;
    }

    return installNewManager(new LocalRepositoryManager(dir), dir.toString());
  }
View Full Code Here

Examples of org.openrdf.repository.manager.LocalRepositoryManager

  @Override
  public synchronized void start()
    throws Exception
  {
    repoManager = new LocalRepositoryManager(dataDir);
    repoManager.initialize();
    serverRepoManager = new ServerRepositoryManager(repoManager);
    super.start();
  }
View Full Code Here

Examples of org.openrdf.repository.manager.LocalRepositoryManager

      }
    }
  }

  private boolean connectDefault() {
    return installNewManager(new LocalRepositoryManager(appConfig.getDataDir()), "default data directory");
  }
View Full Code Here

Examples of org.openrdf.repository.manager.LocalRepositoryManager

    if (!dir.exists() && !dir.isDirectory()) {
      writeError("Specified path is not an (existing) directory: " + path);
      return false;
    }

    return installNewManager(new LocalRepositoryManager(dir), dir.toString());
  }
View Full Code Here

Examples of org.sonatype.aether.repository.LocalRepositoryManager

                {
                    RepositoryUtils.toArtifacts( artifacts, resolutionResult.getDependencyGraph().getChildren(),
                                                 Collections.singletonList( project.getArtifact().getId() ), null );

                    // Maven 2.x quirk: an artifact always points at the local repo, regardless whether resolved or not
                    LocalRepositoryManager lrm = config.session.getLocalRepositoryManager();
                    for ( Artifact artifact : artifacts )
                    {
                        if ( !artifact.isResolved() )
                        {
                            String path = lrm.getPathForLocalArtifact( RepositoryUtils.toArtifact( artifact ) );
                            artifact.setFile( new File( lrm.getRepository().getBasedir(), path ) );
                        }
                    }
                }
                project.setResolvedArtifacts( artifacts );
                project.setArtifacts( artifacts );
View Full Code Here

Examples of org.sonatype.aether.repository.LocalRepositoryManager

                ArtifactRequest artifactRequest = new ArtifactRequest();
                artifactRequest.setArtifact( RepositoryUtils.toArtifact( artifact ) );
                artifactRequest.setRepositories( RepositoryUtils.toRepos( remoteRepositories ) );

                // Maven 2.x quirk: an artifact always points at the local repo, regardless whether resolved or not
                LocalRepositoryManager lrm = session.getLocalRepositoryManager();
                String path = lrm.getPathForLocalArtifact( artifactRequest.getArtifact() );
                artifact.setFile( new File( lrm.getRepository().getBasedir(), path ) );

                result = repoSystem.resolveArtifact( session, artifactRequest );
            }
            catch ( org.sonatype.aether.resolution.ArtifactResolutionException e )
            {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.