Java 类org.apache.maven.model.resolution.InvalidRepositoryException 实例源码

项目:srclib-java    文件:MavenProject.java   
@Override
public void addRepository(Repository repository, boolean replace) throws InvalidRepositoryException {

    String id = repository.getId();

    if (repositoryKeys.contains(id)) {
        if (!replace) {
            return;
        }
        Iterators.removeIf(repositories.iterator(), input -> input.getId().equals(id));
    }
    List<RemoteRepository> additions = Collections.singletonList(
            ArtifactDescriptorUtils.toRemoteRepository(repository));
    repositories =
            remoteRepositoryManager.aggregateRepositories(repositorySystemSession,
                    repositories,
                    additions,
                    true);
    repositoryKeys.add(id);
}
项目:furnace    文件:MavenModelResolver.java   
@Override
public void addRepository(final Repository repository, boolean replace) throws InvalidRepositoryException
{
   if (session.isIgnoreArtifactDescriptorRepositories())
   {
      return;
   }

   if (!repositoryIds.add(repository.getId()))
   {
      if (!replace)
      {
         return;
      }

      removeMatchingRepository(repository.getId());
   }
   repositories.add(new RemoteRepository.Builder(repository.getId(), repository.getName(), repository.getUrl())
            .build());
}
项目:oceano    文件:ProjectModelResolver.java   
public void addRepository( Repository repository )
    throws InvalidRepositoryException
{
    if ( !repositoryIds.add( repository.getId() ) )
    {
        return;
    }

    List<RemoteRepository> newRepositories =
        Collections.singletonList( ArtifactDescriptorUtils.toRemoteRepository( repository ) );

    if ( ProjectBuildingRequest.RepositoryMerging.REQUEST_DOMINANT.equals( repositoryMerging ) )
    {
        repositories = remoteRepositoryManager.aggregateRepositories( session, repositories, newRepositories, true );
    }
    else
    {
        pomRepositories =
            remoteRepositoryManager.aggregateRepositories( session, pomRepositories, newRepositories, true );
        repositories =
            remoteRepositoryManager.aggregateRepositories( session, pomRepositories, externalRepositories, false );
    }
}
项目:oceano    文件:DefaultModelBuilder.java   
private void configureResolver( ModelResolver modelResolver, Model model, DefaultModelProblemCollector problems )
{
    if ( modelResolver == null )
    {
        return;
    }

    problems.setSource( model );

    List<Repository> repositories = model.getRepositories();

    for ( Repository repository : repositories )
    {
        try
        {
            modelResolver.addRepository( repository );
        }
        catch ( InvalidRepositoryException e )
        {
            problems.add( new ModelProblemCollectorRequest(Severity.ERROR, Version.BASE)
                    .setMessage( "Invalid repository " + repository.getId() + ": " + e.getMessage())
                    .setLocation(repository.getLocation( "" ))
                    .setException(e) );
        }
    }
}
项目:incubator-netbeans    文件:NBRepositoryModelResolver.java   
@Override
public void addRepository(Repository repository, boolean replace) throws InvalidRepositoryException {
    RepositorySystem repositorySystem = embedder.lookupComponent(RepositorySystem.class);
    try {
        ArtifactRepository repo = repositorySystem.buildArtifactRepository(repository);
        if(replace) { 
            remoteRepositories.remove(repo);
        }
        remoteRepositories.add(repo);
        remoteRepositories = repositorySystem.getEffectiveRepositories( remoteRepositories );
    } catch (org.apache.maven.artifact.InvalidRepositoryException ex) {
        throw new InvalidRepositoryException(ex.toString(), repository, ex);
    }
}
项目:gate-core    文件:SimpleModelResolver.java   
@Override
public void addRepository(org.apache.maven.model.Repository repository) throws InvalidRepositoryException {
    if (!repositoryIds.add(repository.getId())) {
        return;
    }

    this.repositories.add(ArtifactDescriptorUtils.toRemoteRepository(repository));
}
项目:apache-archiva    文件:RepositoryModelResolver.java   
@Override
public void addRepository( Repository repository )
    throws InvalidRepositoryException
{
    // we just ignore repositories outside of the current one for now
    // TODO: it'd be nice to look them up from Archiva's set, but we want to do that by URL / mapping, not just the
    //       ID since they will rarely match
}
项目:archiva    文件:RepositoryModelResolver.java   
@Override
public void addRepository( Repository repository )
    throws InvalidRepositoryException
{
    // we just ignore repositories outside of the current one for now
    // TODO: it'd be nice to look them up from Archiva's set, but we want to do that by URL / mapping, not just the
    //       ID since they will rarely match
}
项目:furnace    文件:MavenModelResolver.java   
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException
{
   if (repositoryIds.contains(repository.getId()))
   {
      return;
   }

   repositoryIds.add(repository.getId());
   repositories.add(new RemoteRepository.Builder(repository.getId(), repository.getName(), repository.getUrl())
            .build());
}
项目:oceano    文件:DefaultModelResolver.java   
public void addRepository( Repository repository )
    throws InvalidRepositoryException
{
    if ( !repositoryIds.add( repository.getId() ) )
    {
        return;
    }

    List<RemoteRepository> newRepositories =
        Collections.singletonList( ArtifactDescriptorUtils.toRemoteRepository( repository ) );

    this.repositories =
        remoteRepositoryManager.aggregateRepositories( session, repositories, newRepositories, true );
}
项目:forge-furnace    文件:MavenModelResolver.java   
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException
{
   if (repositoryIds.contains(repository.getId()))
   {
      return;
   }

   repositoryIds.add(repository.getId());
   repositories.add(new RemoteRepository.Builder(repository.getId(), repository.getName(), repository.getUrl())
            .build());
}
项目:incubator-netbeans    文件:NBRepositoryModelResolver.java   
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException {
    addRepository(repository, false);
}
项目:gate-core    文件:SimpleModelResolver.java   
@Override
public void addRepository(org.apache.maven.model.Repository repository,
    boolean replace) throws InvalidRepositoryException {
  // TODO Auto-generated method stub

}
项目:meghanada-server    文件:POMParser.java   
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException {}
项目:meghanada-server    文件:POMParser.java   
@Override
public void addRepository(Repository repository, boolean replace)
    throws InvalidRepositoryException {}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DependencyManagementBomTransformation.java   
@Override
public void addRepository(Repository repository)
        throws InvalidRepositoryException {
}
项目:spring-boot-concourse    文件:DependencyManagementBomTransformation.java   
@Override
public void addRepository(Repository repository)
        throws InvalidRepositoryException {
}
项目:contestparser    文件:DependencyManagementBomTransformation.java   
@Override
public void addRepository(Repository repository)
        throws InvalidRepositoryException {
}
项目:srclib-java    文件:MavenProject.java   
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException {
    addRepository(repository, false);
}
项目:tycho-gen    文件:RepoModelResolver.java   
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException
{
    RemoteRepository remote = new RemoteRepository(repository.getId(), repository.getLayout(), repository.getUrl());
    repos.add(remote);
}
项目:redhat-repository-validator    文件:LocalRepositoryModelResolver.java   
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException {
    // noop
}