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


Java ArtifactContextProducer类代码示例

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


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

示例1: setUp

import org.apache.maven.index.ArtifactContextProducer; //导入依赖的package包/类
@Before
@Override
public void setUp()
    throws Exception
{
    super.setUp();

    FileUtils.deleteDirectory( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_1 + "/.indexer" ) );
    assertFalse( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_1 + "/.indexer" ).exists() );

    FileUtils.deleteDirectory( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_2 + "/.indexer" ) );
    assertFalse( new File( FileUtil.getBasedir(), "/target/repos/" + TEST_REPO_2 + "/.indexer" ).exists() );

    archivaConfigControl = EasyMock.createControl( );

    archivaConfig = archivaConfigControl.createMock( ArchivaConfiguration.class );

    DefaultManagedRepositoryAdmin defaultManagedRepositoryAdmin = new DefaultManagedRepositoryAdmin();
    defaultManagedRepositoryAdmin.setArchivaConfiguration( archivaConfig );

    DefaultProxyConnectorAdmin defaultProxyConnectorAdmin = new DefaultProxyConnectorAdmin();
    defaultProxyConnectorAdmin.setArchivaConfiguration( archivaConfig );

    search = new MavenRepositorySearch( plexusSisuBridge, defaultManagedRepositoryAdmin, mavenIndexerUtils,
                                        defaultProxyConnectorAdmin );

    nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );

    artifactContextProducer = plexusSisuBridge.lookup( ArtifactContextProducer.class );

    defaultManagedRepositoryAdmin.setMavenIndexerUtils( mavenIndexerUtils );
    defaultManagedRepositoryAdmin.setIndexer( nexusIndexer );
    defaultManagedRepositoryAdmin.setIndexCreators( mavenIndexerUtils.getAllIndexCreators() );

    config = new Configuration();
    config.addManagedRepository( createRepositoryConfig( TEST_REPO_1 ) );
    config.addManagedRepository( createRepositoryConfig( TEST_REPO_2 ) );
    config.addManagedRepository( createRepositoryConfig( REPO_RELEASE ) );
}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:40,代码来源:AbstractMavenRepositorySearch.java

示例2: initialize

import org.apache.maven.index.ArtifactContextProducer; //导入依赖的package包/类
@PostConstruct
public void initialize()
    throws PlexusSisuBridgeException
{
    log.info( "Initialized {}", this.getClass().getName() );

    artifactContextProducer = plexusSisuBridge.lookup( ArtifactContextProducer.class );

    indexPacker = plexusSisuBridge.lookup( IndexPacker.class, "default" );

    nexusIndexer = plexusSisuBridge.lookup( NexusIndexer.class );

}
 
开发者ID:ruikom,项目名称:apache-archiva,代码行数:14,代码来源:ArchivaIndexingTaskExecutor.java


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