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(Maven3ModelConverter.convertArchetype(each));
      }
    }
    catch (ArchetypeDataSourceException e) {
      MavenServerGlobals.getLogger().warn(e);
    }
  }
private void doCollectArchetypes(String roleHint, Set<MavenArchetype> result)