Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 147659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:49:12+00:00 2026-05-11T08:49:12+00:00

Maven Archetypes are the templates by which you can quickly generate a running example

  • 0

Maven Archetypes are the ‘templates’ by which you can quickly generate a running example of a given framework or project type. I am trying to compile a list of all the Maven archetype catalogs currently active on the net.

From the Maven documentation about catalog files:

Knowledge about archetypes are stored in catalogs.

The catalogs are xml files.

The Archetype Plugin comes bundled with an internal catalog. This one is used by default.

The Archetype Plugin can use catalogs from local filesystem and from HTTP connections.

So far, I’ve gathered this list of repositories that do publish catalogs, but would love to see if anyone knows of more:

mvn archetype:generate -DarchetypeCatalog=local -DarchetypeCatalog=remote -DarchetypeCatalog=http://repo.fusesource.com/maven2 -DarchetypeCatalog=http://cocoon.apache.org -DarchetypeCatalog=http://download.java.net/maven/2 -DarchetypeCatalog=http://myfaces.apache.org -DarchetypeCatalog=http://tapestry.formos.com/maven-repository -DarchetypeCatalog=http://scala-tools.org -DarchetypeCatalog=http://www.terracotta.org/download/reflector/maven2/ 

Links to same: 1) FuseSource 2) Cocoon 3) Java.net 4) MyFaces 5) Tapestry 6) Scala Catalog 7) Terracotta Catalog

You’ll notice that if the repository actually publishes an archetype catalog (all of the above do), you’ll get a UI prompt of all the choices found in that archetype-catalog.xml. For example:

mvn archetype:generate -DarchetypeCatalog=http://scala-tools.org  [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0) Choose archetype: 1: http://scala-tools.org -> scala-archetype-simple (A simple scala project) 2: http://scala-tools.org -> lift-archetype-blank (A blank/empty liftweb project) 3: http://scala-tools.org -> lift-archetype-basic (A basic liftweb project (with DB, css, ...)) Choose a number:  (1/2/3): 

If you want to view the Scala catalog file directly for example, you can browse to http://scala-tools.org/archetype-catalog.xml

But if the repository doesn’t provide an archetype-catalog.xml, then just as PascalT says, you’ll need to know the name in advance (much less convenient) and pass it in command line arguments.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:49:13+00:00Added an answer on May 11, 2026 at 8:49 am

    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.

    Anyway, here are some candidates;

    • Grails has archetypes in http://snapshots.repository.codehaus.org/.
    • Atlassian has archetypes in https://maven.atlassian.com/repository/public/

    Edit: after Matthew clarification on archetype’s catalogs.

    I misunderstood some concepts and my answer isn’t clear and correct.

    The point of catalogs is exactly to not have to know the names of archetypes in advance. They are made to publish archetypes and allow mvn archetype:generate 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 mvn archetype:generate.

    For archetypes without a catalog, users have to type an horrible command that must be documented somewhere (because it requires knowledge of the artifact).

    Regarding my propositions:

    • Atlassian’s archetypes are in the internal catalog. Not a good proposition.

    • Grails archetypes aren’t in the internal catalog or in a published archetype-catalog.xml. Not a good proposition.

    • ServiceMix has catalogs here http://servicemix.apache.org/tooling/ (based on a http://servicemix.apache.org/tooling/<version>/archetype-catalog.xml pattern). Valid proposition.


    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 archetype:crawl goal basically crawls a local Maven repository searching for Archetypes and generates/updates a archetype-catalog.xml file in ~/.m2/repository by default. Projects, people just have to run periodically something like:

    mvn archetype:crawl -Dcatalog=/var/www/html/archetype-catalog.xml

    Grails doesn’t provide a catalog. To create a project, we have to run:

    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 

    But once we did this, we have the archetype in our local repository. So if we type:

    mvn archetype:crawl -Dcatalog=/home/<me>/.m2/archetype-catalog.xml 

    The archetype get listed in ~/.m2/archetype-catalog.xml and we can now use the mvn archetype:generate for Grails too (see option 5):

    mvn archetype:generate ... [INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0) Choose archetype: 1: local -> maven-archetype-archetype (archetype) 2: local -> maven-archetype-j2ee-simple (j2ee) 3: local -> maven-archetype-quickstart (quickstart) 4: local -> maven-archetype-webapp (webapp) 5: local -> grails-maven-archetype (maven-project) 6: internal -> appfuse-basic-jsf (AppFuse archetype for creating a web application with Hibernate, Spring and JSF) ... 

    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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 76k
  • Answers 76k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Right now there have been several approaches to doing this.… May 11, 2026 at 3:01 pm
  • added an answer Type t = Type.GetType('MyDll.MyClass,Mydll') where MyDll.MyClass is the class Location… May 11, 2026 at 3:01 pm
  • added an answer No, you're not leaking memory, but your instinct that you… May 11, 2026 at 3:01 pm

Related Questions

Do any of the IDEs (or any other tool for that matter) have the
In a JSP page(index.jsp): ${requestContext.requestURL} is the URL just shows the expression itself. It
Maven spews out far too many lines of output to my taste (I like
In maven 2.x, how would one set a plugin's property on the command line

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.