本文整理汇总了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 ) );
}
示例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 );
}