当前位置: 首页>>代码示例>>Java>>正文


Java InvalidRepositoryException类代码示例

本文整理汇总了Java中org.apache.maven.model.resolution.InvalidRepositoryException的典型用法代码示例。如果您正苦于以下问题:Java InvalidRepositoryException类的具体用法?Java InvalidRepositoryException怎么用?Java InvalidRepositoryException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


InvalidRepositoryException类属于org.apache.maven.model.resolution包,在下文中一共展示了InvalidRepositoryException类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@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);
}
 
开发者ID:sourcegraph,项目名称:srclib-java,代码行数:21,代码来源:MavenProject.java

示例2: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@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());
}
 
开发者ID:forge,项目名称:furnace,代码行数:21,代码来源:MavenModelResolver.java

示例3: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
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 );
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:24,代码来源:ProjectModelResolver.java

示例4: configureResolver

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
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) );
        }
    }
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:27,代码来源:DefaultModelBuilder.java

示例5: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:15,代码来源:NBRepositoryModelResolver.java

示例6: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@Override
public void addRepository(org.apache.maven.model.Repository repository) throws InvalidRepositoryException {
    if (!repositoryIds.add(repository.getId())) {
        return;
    }

    this.repositories.add(ArtifactDescriptorUtils.toRemoteRepository(repository));
}
 
开发者ID:GateNLP,项目名称:gate-core,代码行数:9,代码来源:SimpleModelResolver.java

示例7: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@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
}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:9,代码来源:RepositoryModelResolver.java

示例8: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
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 );
}
 
开发者ID:gems-uff,项目名称:oceano,代码行数:15,代码来源:DefaultModelResolver.java

示例9: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@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());
}
 
开发者ID:koentsje,项目名称:forge-furnace,代码行数:13,代码来源:MavenModelResolver.java

示例10: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException {}
 
开发者ID:mopemope,项目名称:meghanada-server,代码行数:3,代码来源:POMParser.java

示例11: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@Override
public void addRepository(Repository repository)
		throws InvalidRepositoryException {
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:5,代码来源:DependencyManagementBomTransformation.java

示例12: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException
{
	RemoteRepository remote = new RemoteRepository(repository.getId(), repository.getLayout(), repository.getUrl());
	repos.add(remote);
}
 
开发者ID:bnavetta,项目名称:tycho-gen,代码行数:7,代码来源:RepoModelResolver.java

示例13: addRepository

import org.apache.maven.model.resolution.InvalidRepositoryException; //导入依赖的package包/类
@Override
public void addRepository(Repository repository) throws InvalidRepositoryException {
    // noop
}
 
开发者ID:release-engineering,项目名称:redhat-repository-validator,代码行数:5,代码来源:LocalRepositoryModelResolver.java


注:本文中的org.apache.maven.model.resolution.InvalidRepositoryException类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。