THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
The Struts Maven Archetype creates a working web application template.
Features
- Standard Maven environemtn
- Sitemesh integration
- Action example (both instantiated through Spring and Struts itself)
- Validation example (action and action-alias level)
- Conversion example (global and action level)
- Resource bundle (both global, action and package level)
Installing the Archetype
- Install Maven 2
- Install Subversion
- Checkout the Struts 2 source code (svn co http://svn.apache.org/repos/asf/struts/struts2/trunk
)
Creating an Applicatoin
From a working directory for your project:
Code Block |
---|
mvn archetype:create -DgroupId=tutorial \ -DartifactId=tutorial \ -DarchetypeGroupId=org.apache.struts \ -DarchetypeArtifactId=struts2-archetype-starter \ -DarchetypeVersion=1.0-SNAPSHOT \ |
Substitute the name of your project for "tutorial". Substitute your own package name for "org.apache.struts".
The Archetype will create a ready-run Struts project. Just run "mvn install" to build.
Command Quick Reference
- To build
Code Block mvn install
- To run test cases
Code Block mvn test
- To clean up
Code Block mvn clean
- To package
Code Block mvn package
- To grab necessary JAR files etc.
Code Block mvn initialize
- To run it with Jetty6
Code Block mvn jetty6:run