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


Java DefaultVersionResolver类代码示例

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


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

示例1: configure

import org.apache.maven.repository.internal.DefaultVersionResolver; //导入依赖的package包/类
@Override
protected void configure() {
	bind(ModelLocator.class).to(DefaultModelLocator.class).in(Singleton.class);
	bind(ModelReader.class).to(DefaultModelReader.class).in(Singleton.class);
	bind(ModelValidator.class).to(DefaultModelValidator.class).in(Singleton.class);
	bind(RepositoryConnectorFactory.class).to(BasicRepositoryConnectorFactory.class)
			.in(Singleton.class);
	bind(ArtifactDescriptorReader.class) //
			.to(DefaultArtifactDescriptorReader.class).in(Singleton.class);
	bind(VersionResolver.class) //
			.to(DefaultVersionResolver.class).in(Singleton.class);
	bind(VersionRangeResolver.class) //
			.to(DefaultVersionRangeResolver.class).in(Singleton.class);
	bind(MetadataGeneratorFactory.class).annotatedWith(Names.named("snapshot")) //
			.to(SnapshotMetadataGeneratorFactory.class).in(Singleton.class);
	bind(MetadataGeneratorFactory.class).annotatedWith(Names.named("versions")) //
			.to(VersionsMetadataGeneratorFactory.class).in(Singleton.class);
	bind(TransporterFactory.class).annotatedWith(Names.named("http"))
			.to(HttpTransporterFactory.class).in(Singleton.class);
	bind(TransporterFactory.class).annotatedWith(Names.named("file"))
			.to(FileTransporterFactory.class).in(Singleton.class);
}
 
开发者ID:spring-cloud,项目名称:spring-cloud-function,代码行数:23,代码来源:DependencyResolver.java

示例2: newRepositorySystem

import org.apache.maven.repository.internal.DefaultVersionResolver; //导入依赖的package包/类
static RepositorySystem newRepositorySystem() {
        /*
         * Aether's components implement
         * org.sonatype.aether.spi.locator.Service to ease manual wiring and
         * using the prepopulated DefaultServiceLocator, we only need to
         * register the repository connector factories.
         */

    DefaultServiceLocator locator = new DefaultServiceLocator();
    locator.addService(ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class);
    locator.addService(VersionResolver.class, DefaultVersionResolver.class);
    locator.addService(VersionRangeResolver.class, DefaultVersionRangeResolver.class);
    locator.addService(MetadataGeneratorFactory.class, SnapshotMetadataGeneratorFactory.class);
    locator.addService(MetadataGeneratorFactory.class, VersionsMetadataGeneratorFactory.class);
    locator.setErrorHandler(new MyErrorHandler());

    locator.addService(RepositoryConnectorFactory.class, BasicRepositoryConnectorFactory.class);
    locator.addService(TransporterFactory.class, FileTransporterFactory.class);
    //locator.addService(TransporterFactory.class, WagonTransporterFactory.class);
    locator.addService(TransporterFactory.class, HttpTransporterFactory.class);


    return locator.getService(RepositorySystem.class);
}
 
开发者ID:wildfly,项目名称:wildfly-core,代码行数:25,代码来源:MavenUtil.java

示例3: newRepositorySystem

import org.apache.maven.repository.internal.DefaultVersionResolver; //导入依赖的package包/类
private RepositorySystem newRepositorySystem()
{
    DefaultServiceLocator locator = new DefaultServiceLocator();
    locator.addService( RepositoryConnectorFactory.class,
                        ArchivaRepositoryConnectorFactory.class );// FileRepositoryConnectorFactory.class );
    locator.addService( VersionResolver.class, DefaultVersionResolver.class );
    locator.addService( VersionRangeResolver.class, DefaultVersionRangeResolver.class );
    locator.addService( ArtifactDescriptorReader.class, DefaultArtifactDescriptorReader.class );
    //locator.addService( RepositoryConnectorFactory.class, WagonRepositoryConnectorFactory.class );
    //locator.setServices( WagonProvider.class,  );

    return locator.getService( RepositorySystem.class );
}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:14,代码来源:Maven3DependencyTreeBuilder.java

示例4: build

import org.apache.maven.repository.internal.DefaultVersionResolver; //导入依赖的package包/类
/**
 * Build it.
 * @return The repo system.
 */
@Loggable(Loggable.DEBUG)
public RepositorySystem build() {
    final DefaultServiceLocator locator = new DefaultServiceLocator();
    locator.addService(
        RepositoryConnectorFactory.class,
        FileRepositoryConnectorFactory.class
    );
    locator.addService(
        RepositoryConnectorFactory.class,
        AsyncRepositoryConnectorFactory.class
    );
    locator.addService(
        WagonProvider.class,
        AmazonWagonProvider.class
    );
    locator.addService(
        WagonConfigurator.class,
        PlexusWagonConfigurator.class
    );
    locator.addService(
        RepositoryConnectorFactory.class,
        WagonRepositoryConnectorFactory.class
    );
    locator.addService(
        RepositorySystem.class,
        DefaultRepositorySystem.class
    );
    locator.addService(
        VersionResolver.class,
        DefaultVersionResolver.class
    );
    locator.addService(
        VersionRangeResolver.class,
        DefaultVersionRangeResolver.class
    );
    locator.addService(
        ArtifactDescriptorReader.class,
        DefaultArtifactDescriptorReader.class
    );
    final RepositorySystem system =
        locator.getService(RepositorySystem.class);
    if (system == null) {
        throw new IllegalStateException("failed to get service");
    }
    return system;
}
 
开发者ID:jcabi,项目名称:jcabi-aether,代码行数:51,代码来源:RepositorySystemBuilder.java


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