...
See the Struts 2 Blank Archetype page for more information, including some basic Maven information, how to build and run the app, and basic application information.
...
The Starter Archetype (struts2-archetype-starter
...
)
The Starter archetype creates a more featured application using several common technologies used in production applications.
...
- View, Edit, and Help mode examples
- Simple form for preferences in Edit mode
- Can be deployed as a servlet or portlet application
- Can use Maven Jetty plugin to deploy with the pluto-embedded profile (usage 'mvn jetty:run -Ppluto-embedded', then access http://localhost:8080/
<artifactId>/pluto/index.jsp)
...
The Portlet Database Archetype (struts2-archetype-dbportlet)
...
The Portlet database archetype creates a simple JSR 168 portlet that displays the contents of a database table.
...
- Uses Spring and Hsql to show a real database query
- Builtin caching of query results
- View, Edit, and Help mode examples
- Simple form for preferences in Edit mode
- Can be deployed as a servlet or portlet application
- Can use Maven Jetty plugin to deploy as a servlet webapp
The Blank Convention Archetype (struts2-archetype-convention)
Features
- Convention-based validation
- Example actions
- Package-level resource bundle
- Unit-testing
- Google AppEgine aware
The Plugin Archetype (struts2-archetype-plugin)
Features
- Example new result type
- Example XML-based configuration
Creating an Application Using a Maven Archetype
...
Code Block |
---|
mvn archetype:generate -B \ -DgroupId=tutorial \ -DartifactId=tutorial \ -DarchetypeGroupId=org.apache.struts \ -DarchetypeArtifactId=struts2-archetype-blank \ -DarchetypeVersion=2.1.68 |
Archetype Parameters
The -B
option runs archetype:generate
in batch mode; it avoids a prompt to confirm our settings.
...