use of org.apache.maven.archetype.source.ArchetypeDataSourceException in project intellij-community by JetBrains.
the class Maven3ServerIndexerImpl method doCollectArchetypes.
private void doCollectArchetypes(String roleHint, Set<MavenArchetype> result) throws RemoteException {
try {
ArchetypeDataSource source = myEmbedder.getComponent(ArchetypeDataSource.class, roleHint);
ArchetypeCatalog archetypeCatalog = source.getArchetypeCatalog(new Properties());
for (Archetype each : archetypeCatalog.getArchetypes()) {
result.add(MavenModelConverter.convertArchetype(each));
}
} catch (ArchetypeDataSourceException e) {
Maven3ServerGlobals.getLogger().warn(e);
}
}
use of org.apache.maven.archetype.source.ArchetypeDataSourceException in project intellij-community by JetBrains.
the class Maven2ServerIndexerImpl method doCollectArchetypes.
private void doCollectArchetypes(String roleHint, Set<MavenArchetype> result) throws RemoteException {
try {
ArchetypeDataSource source = myEmbedder.getComponent(ArchetypeDataSource.class, roleHint);
ArchetypeCatalog catalog = source.getArchetypeCatalog(new Properties());
for (Archetype each : (Iterable<? extends Archetype>) catalog.getArchetypes()) {
result.add(Maven2ModelConverter.convertArchetype(each));
}
} catch (ArchetypeDataSourceException e) {
Maven2ServerGlobals.getLogger().warn(e);
}
}
Aggregations