Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strike>To be honest, I don't really see the point of building a list of all catalogs. It looks more "natural" to me to pick a project first and then add the catalog if required. This is why there is IMO more value in a list of archetypes. You'll need their name anyway, even if you have all catalogs in a list.</p> <p>Anyway, here are some candidates;</p> <ul> <li>Grails has archetypes in <a href="http://snapshots.repository.codehaus.org/" rel="noreferrer">http://snapshots.repository.codehaus.org/</a>.</li> <li>Atlassian has archetypes in <a href="https://maven.atlassian.com/repository/public/" rel="noreferrer">https://maven.atlassian.com/repository/public/</a></strike></li> </ul> <p>Edit: after Matthew clarification on archetype's catalogs.</p> <p>I misunderstood some concepts and my answer isn't clear and correct.</p> <p>The point of catalogs is exactly to <strong>not have to know the names of archetypes in advance</strong>. They are made to publish archetypes and allow <code>mvn archetype:generate</code> to list archetypes. So it makes sense to add "external" catalogs (understand not in the internal) to get a wider list of known archetypes when using <code>mvn archetype:generate</code>.</p> <p>For archetypes without a catalog, users have to type an horrible command that must be documented somewhere (because it requires knowledge of the artifact).</p> <p>Regarding my propositions:</p> <ul> <li><p>Atlassian's archetypes are in the internal catalog. <strong>Not a good proposition.</strong></p></li> <li><p>Grails archetypes aren't in the internal catalog or in a published <code>archetype-catalog.xml</code>. <strong>Not a good proposition.</strong></p></li> <li><p><a href="http://servicemix.apache.org/" rel="noreferrer">ServiceMix</a> has catalogs here <a href="http://servicemix.apache.org/tooling/" rel="noreferrer">http://servicemix.apache.org/tooling/</a> (based on a <code>http://servicemix.apache.org/tooling/&lt;version&gt;/archetype-catalog.xml</code> pattern). <strong>Valid proposition.</strong></p></li> </ul> <hr> <p>One fun thing I learned while digging this. The maven guys provides a nice tool that helps people developing archetypes to create a catalog XML: the <code>archetype:crawl</code> goal basically crawls a local Maven repository searching for Archetypes and generates/updates a <code>archetype-catalog.xml</code> file in <code>~/.m2/repository</code> by default. Projects, people just have to run periodically something like:</p> <pre>mvn archetype:crawl -Dcatalog=/var/www/html/archetype-catalog.xml</pre> <p>Grails doesn't provide a catalog. To create a project, <a href="http://www.grails.org/Maven+Integration" rel="noreferrer">we have to run</a>:</p> <pre><code>mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate -DarchetypeGroupId=org.grails \ -DarchetypeArtifactId=grails-maven-archetype \ -DarchetypeVersion=1.0 \ -DarchetypeRepository=http://snapshots.repository.codehaus.org \ -DgroupId=example -DartifactId=my-app </code></pre> <p>But once we did this, we have the archetype in our local repository. So if we type: </p> <pre><code>mvn archetype:crawl -Dcatalog=/home/&lt;me&gt;/.m2/archetype-catalog.xml </code></pre> <p>The archetype get listed in <code>~/.m2/archetype-catalog.xml</code> and we can now use the <code>mvn archetype:generate</code> for Grails too (see option 5):</p> <pre><code>mvn archetype:generate ... [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0) Choose archetype: 1: local -&gt; maven-archetype-archetype (archetype) 2: local -&gt; maven-archetype-j2ee-simple (j2ee) 3: local -&gt; maven-archetype-quickstart (quickstart) 4: local -&gt; maven-archetype-webapp (webapp) 5: local -&gt; grails-maven-archetype (maven-project) 6: internal -&gt; appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) ... </code></pre> <p>This is of course a (hugly) workaround and it might have side effects (you won't see new versions of archetypes). Actually, I don't think the archetype:crawl goal is intended for this use. I would like all projects them to publish their archetypes.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload