本文整理匯總了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 );
}