The Struts Scripting component, for the most part, follows Apache Struts build and source code layout, so if you are familiar with another Struts component, you'll be at home here. If not, this guide first walks you though what is where and why. Next, it gives help on how to build common artifacts.
Again, since the heavy lifting is done by the Bean Scripting Framework and the scripting engines themselves, there isn't much code to this project itself.
/apps/scripting-mailreader
- A modified version of the classic Struts Mailreader example application.
This rendition replaces Java-coded Struts Actions with Groovy scripts./scripting/src
- All other scripting source code can be found here/scripting/src/main/java
- The source code for the Struts Scripting framework itself/scripting/src/site/xdocs
- The XML source code for all documentation, including this guide./scripting/target
- Maven puts all compiled files into this temporary directory.Struts Scripting uses Apache Maven 2 to build its JAR, example application, documentation, and distribution files. Maven is used throughout Struts for building subprojects, providing a consistent build environment to Struts users. To follow these build instructions, you will need to have Apache Maven 2 installed and its mvn
executable available in your command path.
Since there are a bunch of build targets, we will break the build down into tasks that you might want to accomplish and show the best way to complete them.
mvn jar:jar
' which will create the JAR as /scripting/target/struts-scripting-VERSION.jar
./apps/scripting-mailreader
and run 'mvn install
' to create /apps/scripting-mailreadertarget/scripting-mailreader.war
.mvn site
' to create the Struts Scripting website at /scripting/target/docs
.