What are the URLs of all the Maven Archetype directories you know about?

Maven archetypes are “templates” with which you can quickly generate an example of how a given structure or project type is executed. I am trying to compile a list of all Maven archetype directories that are currently active on the network.

From the Maven documentation on directory files :

Knowledge of archetypes is stored in catalogs.

Directories are xml files.

The Archetype plugin comes complete with an internal directory. This one is used by default.

The Archetype plugin can use directories from the local file system and from an HTTP connection.

So far, I have compiled this list of repositories that publish directories, but I would like to know if anyone knows 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 the same: 1) FuseSource 2) Cocoon 3) Java.net 4) MyFaces 5) Tapestry 6) Scala Catalog 7) Terracotta Catalog

You will notice that if the repository actually publishes the archetype directory (all of the above), you will receive a user interface invitation of all the options found in this 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, for example, to view the Scala catalog file, for example, go to http://scala-tools.org/archetype-catalog.xml

But if the repository does not provide the archetype-catalog.xml file, then, as PascalT says, you need to know the name in advance (much less conveniently) and pass it to the command line arguments.

+41
java maven-2 maven-plugin maven-archetype
Mar 11 '09 at 17:24
source share
5 answers

Honestly, I really don't see the point of creating a list of all directories. It seems to me more “natural" to first select a project, and then add a directory, if necessary. This is why IMO values ​​the list of archetypes more. You will still need their name, even if you have all the directories in the list.

In any case, here are some candidates;

Edit: after clarifying Matthew according to archetype catalogs.

I misunderstood some concepts, and my answer is not clear and true.

A directory point does not need to know the names of archetypes in advance . They are made for publishing archetypes and allow mvn archetype:generate list archetypes. Therefore, it makes sense to add "external" directories (do not understand the internal) to get a wider list of known archetypes when using mvn archetype:generate .

For archetypes without a directory, users must enter a terrible command that needs to be documented somewhere (because it requires knowledge of the artifact).

Regarding my suggestions:

  • Atlas archetypes are in the internal catalog. Not a good offer.

  • Grails archetypes are not in the internal directory or in the published archetype-catalog.xml . Not a good offer.

  • ServiceMix contains the http://servicemix.apache.org/tooling/ directories (based on the http://servicemix.apache.org/tooling/<version>/archetype-catalog.xml template). Valid offer.




One fun thing I found out by digging this. The maven guys provide a good tool that helps people develop archetypes for creating an XML catalog: target archetype:crawl basically bypasses the local Maven repository, which is looking for Archetypes, and by default generates / updates the archetype-catalog.xml by ~/.m2/repository . Projects, people just have to periodically run something like:

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

Grails does not provide a directory. To create a project, we need 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 have done this, we have the archetype in our local repository. Therefore, if we type:

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

The archetype appears in ~/.m2/archetype-catalog.xml , and now we can use mvn archetype:generate for Grails (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, of course, is a bypass (bypass) and can have side effects (you will not see new versions of archetypes). Actually, I don't think it's an archetype: the crawl target is for this use. I would like all projects to publish their archetypes.

+16
Mar 13 '09 at 5:24
source share

Terracotta has one, but I don't know that the url is not working ... will be published. In addition, I used archetypes in the past of AppFuse ( http://static.appfuse.org/releases/ ) and Webtide , although I don’t know where to find their archetype catalogs.

The terracotta repository and directory are here: http://www.terracotta.org/download/reflector/maven2/

Perhaps this is useful: http://docs.codehaus.org/display/MAVENUSER/Archetypes+List

+1
Mar 13 '09 at 4:34
source share

The Nexus link index consumed by M2eclipse is aware of all archetypes and allows you to select them when you create a new maven project from ide.

+1
Jul 16 '09 at 12:30
source share

In the list of Maven archetypes, refer to this link http://www.myjeeva.com/2012/06/exclusive-maven-archetype-list/ (you will find about 607 archetypes).

When using the mvn archetype:generate command when specifying Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 197:

specify the archetype number in the link above.

Note: the default value is 197

  • 197 → org.apache.maven.archetypes: maven-archetype-quickstart (Archetype containing a sample Maven project.)
+1
Jul 01 '12 at 6:19 06:19
source share

Codehaus has another resource for a very reliable list of archetypes on the net. http://docs.codehaus.org/display/MAVENUSER/Archetypes+List

0
Feb 05 '10 at 22:47
source share



All Articles