For those of us using Maven as a build system, we can use the Maven Archetype to create a new application.
First consult the maven archetype catalog
mvn archetype:generate -DarchetypeCatalog=http://struts.apache.org/
you can use one of the following achetypes:
The Blank Convention Archetype (struts2-archetype-convention)
It has the following features:
to download it trough maven run the command
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-convention \
-DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
-DremoteRepositories=http://struts.apache.org
The Blank Archetype (struts2-archetype-blank)
It has the following features:
to download it trough maven run the command
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-blank \
-DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
-DremoteRepositories=http://struts.apache.org
The Starter Archetype (struts2-archetype-starter)
It has the following features:
to download it trough maven run the command
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-starter \
-DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
-DremoteRepositories=http://struts.apache.org
The AngularJS Archetype (struts2-archetype-angularjs)
It has the following features:
to download it trough maven run the command
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-angularjs \
-DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
-DremoteRepositories=http://struts.apache.org
The Portlet Blank Archetype (struts2-archetype-portlet)
It has the following features:
View, Edit, and Help mode examples
to download it trough maven run the command
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-portlet \
-DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
-DremoteRepositories=http://struts.apache.org
The Portlet Database Archetype (struts2-archetype-dbportlet)
It has the following features:
Uses Spring and Hsql to show a real database query
to download it trough maven run the command
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myWebApp \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-dbportlet \
-DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
-DremoteRepositories=http://struts.apache.org
The Plugin Archetype (struts2-archetype-plugin)
It has the following features:
to download it trough maven run the command
mvn archetype:generate -B -DgroupId=com.mycompany.mysystem \
-DartifactId=myPlugin \
-DarchetypeGroupId=org.apache.struts \
-DarchetypeArtifactId=struts2-archetype-plugin \
-DarchetypeVersion=<CURRENT_STRUTS_VERSION> \
-DremoteRepositories=http://struts.apache.org