The information on this page is user-contributed. Its accuracy is not verified by the Maven team!
Links: Guide to creating archetypes, Plugin documentation
What Archetypes are available?
Maven's standard archetypes
View the released archetypes in the central repository at ibiblio:
- http://repo1.maven.org/maven2/org/apache/maven/archetypes/
- quickstart: creates a default pom.xml, the src and a test folders (including a default App.java/AppTest.java).
- site: quickstart + some filters + a default site structure. Site includes a second language (french). Note that the site archetype can only be run to create a new project, it can not be run after a project was initialized with another archetype.
- webapp: for creating web applications.
View the latest source code for Maven archetypes in the Subversion repository:
How to use
To create a webapp file structure:
mvn archetype:create -DgroupId=mygroupid -DartifactId=artifactid -DarchetypeArtifactId=maven-archetype-webapp
User-contributed archetypes
Apache MyFaces
Apache Struts
- Struts 1.3 http://svn.apache.org/repos/asf/struts/maven/trunk/struts-archetype-blank/README.txt
- Struts 2 http://svn.apache.org/repos/asf/struts/maven/trunk/struts2-archetype-quickstart/README.txt
Apache Shale
- http://svn.apache.org/repos/asf/struts/shale/trunk/maven/archetypes/shale-archetype-blank/README.txt
- http://svn.apache.org/repos/asf/struts/shale/trunk/maven/archetypes/shale-starter/README.txt
Tips and Surprises
There is currently no way to escape expressions so that they are not filtered. See http://jira.codehaus.org/browse/ARCHETYPE-39
You can, however, prevent an entire file from being filtered:
<archetype>
...
<resources>
<resource filtered="false">src/main/resources/example/package.properties</resource>
...
</resources>
...
</archetype>
Similarly, there is a <resource encoding="..."> attribute.

1 Comment
Hide/Show CommentsAug 29, 2008
Grégory Joseph
Escaping properties works for me:
\${package} outputs${package} in my resource.