當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。