[ http://jira.codehaus.org/browse/ARCHETYPE-124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_123216 ]
David Bernard commented on ARCHETYPE-124: ----------------------------------------- May about remote custom repo : current code in archetype-plugin/src/main/java/org/apache/maven/archetype/ui/DefaultArchetypeSelector.java : while (ca.hasNext()) { String catalog = (String) ca.next(); if ("internal".equalsIgnoreCase(catalog)) { archetypes.put("internal", archetype.getInternalCatalog().getArchetypes()); } else if ("local".equalsIgnoreCase(catalog)) { archetypes.put("local", archetype.getDefaultLocalCatalog().getArchetypes()); } else if ("remote".equalsIgnoreCase(catalog)) { archetypes.put("remote", archetype.getRemoteCatalog().getArchetypes()); } else if (catalog.startsWith("file://")) { String path = catalog.substring(7); archetypes.put("local", archetype.getLocalCatalog(path).getArchetypes()); } else if (catalog.startsWith("http://")) { archetypes.put("remote", archetype.getRemoteCatalog(catalog)); } } should contains : } else if (catalog.startsWith("http://")) { archetypes.put("remote", archetype.getRemoteCatalog(catalog).getArchetypes()); } > custom archetype-catalog.xml not read > ------------------------------------- > > Key: ARCHETYPE-124 > URL: http://jira.codehaus.org/browse/ARCHETYPE-124 > Project: Maven Archetype > Issue Type: Bug > Components: Plugin > Affects Versions: 2.0-alpha-1 > Reporter: David Bernard > Priority: Blocker > > I try to create a custom archetype-catalog.xml and use it > "mvn archetype:create -DarchetypeCatalog=file://tmp/archetype-catalog.xml" > but the displayed list is empty, (you could try with the > https://svn.apache.org/repos/asf/maven/archetype/tags/maven-archetype-2.0-alpha-1/archetype-common/src/main/resources/archetype-catalog.xml) > And if I copy on a http server : > "mvn archetype:create -DarchetypeCatalog=http://scala-tools.org/" > Then I got an exception > java.lang.ClassCastException: > org.apache.maven.archetype.catalog.ArchetypeCatalog > at > org.apache.maven.archetype.ui.DefaultArchetypeSelectionQueryer.selectArchetype(DefaultArchetypeSelectionQueryer.java:97) > at > org.apache.maven.archetype.ui.DefaultArchetypeSelector.selectArchetype(DefaultArchetypeSelector.java:179) > at > org.apache.maven.archetype.mojos.CreateProjectFromArchetypeMojo.execute(CreateProjectFromArchetypeMojo.java:165) > It very critical, because our user can't create new project from our > archetypes. > (workaround : "mvn > org.apache.maven.plugins:maven-archetype-plugin:1.0-alpha-7:create ..." -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira