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

项目: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 ModelResolver newCopy() {
    return new NBRepositoryModelResolver(this);
}
项目:migration-tooling    文件:DefaultModelResolver.java   
@Override
public ModelResolver newCopy() {
  return new DefaultModelResolver(aether, repositories, ruleNameToModelSource, modelBuilder);
}
项目:gate-core    文件:SimpleModelResolver.java   
@Override
public ModelResolver newCopy() {
    return new SimpleModelResolver(this);
}
项目:apache-archiva    文件:RepositoryModelResolver.java   
@Override
public ModelResolver newCopy()
{
    return new RepositoryModelResolver( managedRepository,  pathTranslator, wagonFactory, remoteRepositories, 
                                        networkProxyMap, targetRepository );
}
项目:meghanada-server    文件:POMParser.java   
@Override
public ModelResolver newCopy() {
  return this;
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot    文件:DependencyManagementBomTransformation.java   
@Override
public ModelResolver newCopy() {
    return this;
}
项目:spring-boot-concourse    文件:DependencyManagementBomTransformation.java   
@Override
public ModelResolver newCopy() {
    return this;
}
项目:contestparser    文件:DependencyManagementBomTransformation.java   
@Override
public ModelResolver newCopy() {
    return this;
}
项目:flatten-maven-plugin    文件:FlattenModelResolver.java   
/**
 * {@inheritDoc}
 */
public ModelResolver newCopy()
{
    return new FlattenModelResolver( this );
}
项目:srclib-java    文件:MavenProject.java   
@Override
public ModelResolver newCopy() {
    return new MavenModelResolver(this);
}
项目:archiva    文件:RepositoryModelResolver.java   
@Override
public ModelResolver newCopy()
{
    return new RepositoryModelResolver( managedRepository,  pathTranslator, wagonFactory, remoteRepositories, 
                                        networkProxyMap, targetRepository );
}
项目:tycho-gen    文件:RepoModelResolver.java   
@Override
public ModelResolver newCopy()
{
    return this;
}
项目:furnace    文件:MavenModelResolver.java   
@Override
public ModelResolver newCopy()
{
   return new MavenModelResolver(this);
}
项目:oceano    文件:DefaultModelResolver.java   
public ModelResolver newCopy()
{
    return new DefaultModelResolver( this );
}
项目:oceano    文件:ProjectModelResolver.java   
public ModelResolver newCopy()
{
    return new ProjectModelResolver( this );
}
项目:oceano    文件:DefaultModelBuildingRequest.java   
public ModelResolver getModelResolver()
{
    return this.modelResolver;
}
项目:oceano    文件:DefaultModelBuildingRequest.java   
public DefaultModelBuildingRequest setModelResolver( ModelResolver modelResolver )
{
    this.modelResolver = modelResolver;

    return this;
}
项目:oceano    文件:DefaultModelBuilder.java   
private ModelData readParentExternally( Model childModel, ModelBuildingRequest request,
                                        DefaultModelProblemCollector problems )
    throws ModelBuildingException
{
    problems.setSource( childModel );

    Parent parent = childModel.getParent();

    String groupId = parent.getGroupId();
    String artifactId = parent.getArtifactId();
    String version = parent.getVersion();

    ModelResolver modelResolver = request.getModelResolver();

    if ( modelResolver == null )
    {
        throw new IllegalArgumentException( "no model resolver provided, cannot resolve parent POM "
            + ModelProblemUtils.toId( groupId, artifactId, version ) + " for POM "
            + ModelProblemUtils.toSourceHint( childModel ) );
    }

    ModelSource modelSource;
    try
    {
        modelSource = modelResolver.resolveModel( groupId, artifactId, version );
    }
    catch ( UnresolvableModelException e )
    {
        StringBuilder buffer = new StringBuilder( 256 );
        buffer.append( "Non-resolvable parent POM" );
        if ( !containsCoordinates( e.getMessage(), groupId, artifactId, version ) )
        {
            buffer.append( " " ).append( ModelProblemUtils.toId( groupId, artifactId, version ) );
        }
        if ( childModel != problems.getRootModel() )
        {
            buffer.append( " for " ).append( ModelProblemUtils.toId( childModel ) );
        }
        buffer.append( ": " ).append( e.getMessage() );
        if ( childModel.getProjectDirectory() != null )
        {
            if ( parent.getRelativePath() == null || parent.getRelativePath().length() <= 0 )
            {
                buffer.append( " and 'parent.relativePath' points at no local POM" );
            }
            else
            {
                buffer.append( " and 'parent.relativePath' points at wrong local POM" );
            }
        }

        problems.add( new ModelProblemCollectorRequest(Severity.FATAL, Version.BASE)
                .setMessage( buffer.toString())
                .setLocation(parent.getLocation( "" ))
                .setException(e));
        throw problems.newModelBuildingException();
    }

    ModelBuildingRequest lenientRequest = request;
    if ( request.getValidationLevel() > ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0 )
    {
        lenientRequest = new FilterModelBuildingRequest( request )
        {
            @Override
            public int getValidationLevel()
            {
                return ModelBuildingRequest.VALIDATION_LEVEL_MAVEN_2_0;
            }
        };
    }

    Model parentModel = readModel( modelSource, null, lenientRequest, problems );

    ModelData parentData = new ModelData( parentModel, groupId, artifactId, version );

    return parentData;
}
项目:oceano    文件:FilterModelBuildingRequest.java   
public ModelResolver getModelResolver()
{
    return request.getModelResolver();
}
项目:oceano    文件:FilterModelBuildingRequest.java   
public FilterModelBuildingRequest setModelResolver( ModelResolver modelResolver )
{
    request.setModelResolver( modelResolver );

    return this;
}
项目:redhat-repository-validator    文件:LocalRepositoryModelResolver.java   
@Override
public ModelResolver newCopy() {
    return this;
}
项目:forge-furnace    文件:MavenModelResolver.java   
@Override
public ModelResolver newCopy()
{
   return new MavenModelResolver(this);
}
项目:oceano    文件:ModelBuildingRequest.java   
/**
 * Gets the model resolver to use for resolution of mixins or parents that are not locally reachable from the
 * project directory.
 *
 * @return The model resolver or {@code null} if not set.
 */
ModelResolver getModelResolver();
项目:oceano    文件:ModelBuildingRequest.java   
/**
 * Sets the model resolver to use for resolution of mixins or parents that are not locally reachable from the
 * project directory.
 *
 * @param modelResolver The model resolver to use, may be {@code null}.
 * @return This request, never {@code null}.
 */
ModelBuildingRequest setModelResolver( ModelResolver modelResolver );