In my Plugin I need to find and add User Archetypes as I want to guide the user during the Project / Module configuration. I can manually find and add the Archetypes and build the project but this is error prone.
What is the best way to find an Maven Archetype when I know its group id?
I tried this:
MavenSearcher searcher = new MavenArtifactSearcher();
List<MavenArtifactSearchResult> result = searcher.search(project, "org.apache.sling", 200);
But the project is not setup yet and so it cannot find the Maven Indices.
What I would love to do is to find all Artfiacts that have this group id and end with "archetype". Eclipse has the "ArchetypeCatalogFactory" which find all aviable archetypes. I don't need to find all archetypes but the onces in a given folder and sub folder like (org/apache/sling).
Thanks - Andy