Reference1: <Practical Apache Struts 2 Web 2.0 Projects>
Reference3: http://struts.apache.org/2.3.4/docs/struts-2-maven-archetypes.html
0. Search the lastest version on the specified repository, in this case we take the repo1.
1. Maven → Maven Project in the new Project wizard
2. Click on Next twice and you will arrive on Select An Archetype screen.
3. Click on Add Archetype button and supply following value
Archetype Group Id – org.apache.struts
Archetype Artifact Id – struts2-archetype-starter
Archetype Version – 2.3.7
Repository Url - http://repo1.maven.org/maven2
Troubleshooting:
1. mvn jetty:run, if you want to open the page, you would get this extremely unpleasant error:
java.lang.NullPointerException at org.apache.struts2.impl.StrutsActionProxy.getErrorMessage(StrutsActionProxy.java:69)
Analysis:
(1) I tried both Maven 3.04 and 2.2.1, no joy.
(2) The ${package} matters, once I have replaced it with specific package in applicationcontext.xml and struts.xml, the error went away immediately.
<!-- <bean id="helloWorldAction" class="${package}.HelloWorldAction" singleton="false" /> -->
<bean id="helloWorldAction" class="com.fdar.apress.HelloWorldAction" singleton="false" />