[forge-issues] [JBoss JIRA] (FORGE-2242) Programmatically adding maven archetype catalog - is shown as unknown in archetype-list

George Gastaldi (JIRA) issues at jboss.org
Thu Feb 19 10:01:49 EST 2015


     [ https://issues.jboss.org/browse/FORGE-2242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

George Gastaldi closed FORGE-2242.
----------------------------------
         Assignee: George Gastaldi
    Fix Version/s: 2.14.1.Final
       Resolution: Done


> Programmatically adding maven archetype catalog - is shown as unknown in archetype-list
> ---------------------------------------------------------------------------------------
>
>                 Key: FORGE-2242
>                 URL: https://issues.jboss.org/browse/FORGE-2242
>             Project: Forge
>          Issue Type: Bug
>    Affects Versions: 2.14.0.Final
>            Reporter: Claus Ibsen
>            Assignee: George Gastaldi
>            Priority: Minor
>             Fix For: 2.14.1.Final
>
>
> When installing the Camel forge commands we want to install the Camel archetypes as a catalog out of the box.
> I got some code that does that (but currently coded to include all from central, but we will filter out this later)
> {code}
>     // TODO: Remove when when using Forge 2.14.1+
>     void startup(@Observes @Local PostStartup startup, ArchetypeCatalogFactoryRegistry registry) {
> //        registry.addArchetypeCatalogFactory(this);
>         try {
>             URL url = new URL("http://repo2.maven.org/maven2/archetype-catalog.xml");
>             String defaultRepo = extractRepository(url);
>             registry.addArchetypeCatalogFactory("central", url, defaultRepo);
>         } catch (MalformedURLException e) {
>             logger.log(Level.SEVERE, "Error while retrieving archetypes", e);
>         }
>     }
> {code}
> But the archeype-list command shows this as unknown.
> {code}
> [forge-distribution-2.14.0.Final]$ addon-install --coordinate io.fabric8.forge:camel,2.2-SNAPSHOT
> ***SUCCESS*** Addon io.fabric8.forge:camel,2.2-SNAPSHOT was installed successfully.
> [forge-distribution-2.14.0.Final]$ archetype-list
> central = unknown
> {code}
> If I add the archetype manually using archetype-add then the url is listed correctly.
> As I am using the add command that takes an URL then it should be shown
> {code}
>    void addArchetypeCatalogFactory(String name, URL catalogURL, String defaultRepositoryName);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the forge-issues mailing list