本文整理汇总了Java中org.apache.camel.catalog.maven.DefaultMavenArtifactProvider类的典型用法代码示例。如果您正苦于以下问题:Java DefaultMavenArtifactProvider类的具体用法?Java DefaultMavenArtifactProvider怎么用?Java DefaultMavenArtifactProvider使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DefaultMavenArtifactProvider类属于org.apache.camel.catalog.maven包,在下文中一共展示了DefaultMavenArtifactProvider类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ConnectorCatalog
import org.apache.camel.catalog.maven.DefaultMavenArtifactProvider; //导入依赖的package包/类
public ConnectorCatalog(ConnectorCatalogProperties props) {
connectorCatalog = new DefaultCamelConnectorCatalog();
camelCatalog = new DefaultCamelCatalog(true);
prefetchConnectors();
maven = new DefaultMavenArtifactProvider();
for (Map.Entry<String, String> repo : props.getMavenRepos().entrySet()) {
maven.addMavenRepository(repo.getKey(), repo.getValue());
}
for (String gav : props.getConnectorGAVs()) {
addConnector(gav);
}
}
示例2: createArtifactProvider
import org.apache.camel.catalog.maven.DefaultMavenArtifactProvider; //导入依赖的package包/类
private static MavenArtifactProvider createArtifactProvider() {
final DefaultMavenArtifactProvider mavenArtifactProvider = new DefaultMavenArtifactProvider();
mavenArtifactProvider.setLog(true);
mavenArtifactProvider.addMavenRepository("maven.central", "https://repo1.maven.org/maven2");
mavenArtifactProvider.addMavenRepository("redhat.ga", "https://maven.repository.redhat.com/ga");
mavenArtifactProvider.addMavenRepository("jboss.ea", "https://repository.jboss.org/nexus/content/groups/ea");
return mavenArtifactProvider;
}
示例3: init
import org.apache.camel.catalog.maven.DefaultMavenArtifactProvider; //导入依赖的package包/类
public void init() throws Exception {
connectorCatalog = new DefaultCamelConnectorCatalog();
camelCatalog = new DefaultCamelCatalog(true);
maven = new DefaultMavenArtifactProvider();
// add 3rd party maven repos
System.out.println("Adding bintray and jcenter as 3rd party Maven repositories");
maven.addMavenRepository("jcenter", "https://jcenter.bintray.com");
}