📄 source-guide.html
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>Struts Scripting Source Code Guide - Apache Struts - Scripts BSF Scripting</title><style type="text/css" media="all"> @import url("./style/maven-base.css"); @import url("./style/maven-theme.css");</style><link rel="stylesheet" href="./style/print.css" type="text/css" media="print"></link><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta></head><body class="composite"><div id="banner"><a href="http://www.apache.org/" id="organizationLogo"><img alt="The Apache Software Foundation" src="http://www.apache.org/images/asf-logo.gif"></img></a><a href="http://struts.apache.org/struts-scripting" id="projectLogo"><img alt="Struts Scripting" src="http://struts.apache.org/images/struts.gif"></img></a><div class="clear"><hr></hr></div></div><div id="breadcrumbs"><div class="xleft">Last published: 17 December 2005 <span class="separator">|</span>燚oc for 1.0.1 </div><div class="xright"></div><div class="clear"><hr></hr></div></div><div id="leftColumn"><div id="navcolumn"><div id="menuStruts_BSF_Scripting"><h5>Struts BSF Scripting</h5><ul><li class="none"><a href="index.html">Welcome</a></li><li class="none"><a href="index.html#features">Features</a></li><li class="none"><a href="index.html#documentation">Documentation</a></li><li class="none"><a href="user-guide.html">User Guide</a></li><li class="none"><a href="source-guide.html">Source Guide</a></li><li class="none"><a href="http://struts.apache.org/acquiring.html" class="externalLink" title="External Link">Download</a></li></ul></div><div id="menuQuick_Links"><h5>Quick Links</h5><ul><li class="none"><a href="../index.html">Apache Struts Home</a></li></ul></div><div id="menuProject_Documentation"><h5>Project Documentation</h5><ul><li class="none"><a href="index.html">About</a></li><li class="collapsed"><a href="project-info.html">Project Info</a></li><li class="collapsed"><a href="maven-reports.html">Project Reports</a></li><li class="none"><a href="http://maven.apache.org/development-process.html" class="externalLink" title="External Link">Development Process</a></li></ul></div><div id="legend"><h5>Legend</h5><ul><li class="externalLink">External Link</li><li class="newWindow">Opens in a new window</li></ul></div><a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy"><img alt="Built by Maven" src="./images/logos/maven-button-1.png"></img></a></div></div><div id="bodyColumn"><div class="contentBox"><div class="section"><a name="Struts_Scripting_Source_Code_Guide"></a><h2>Struts Scripting Source Code Guide</h2> <a name="overview"></a> <p>The Struts Scripting project, for the most part, follows Apache Struts build and source code layout, so if you are familiar with another Struts project, 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. </p> <p>Again, since the heavy lifting is done by the <a href="http://jakarta.apache.org/bsf" class="externalLink" title="External Link">Bean Scripting Framework </a> and the scripting engines themselves, there isn't much code to this project itself. </p> <ul> <li><a href="#layout">Source code layout</a></li> <li><a href="#build">Build instructions</a></li> </ul> <div class="subsection"><a name="Source_code_layout"></a><h3>Source code layout</h3> <a name="layout"></a> <p>When you unzip the latest release Struts Scripting or check it out from subversion (more help on subversion at the Struts <a href="http://struts.apache.org/acquiring.html#Source_Code" class="externalLink" title="External Link">source code</a>), you'll be staring at the following directory structure: </p> <ul> <li><code>/src</code> - All source code can be found here</li> <li><code>/src/java</code> - The source code for the Struts Scripting framework itself</li> <li><code>/src/struts-example</code> - A modified version of the Struts 1.2.8 Mailreader example application. This version replaces Java-coded Struts Actions with <a href="http://groovy.codehaus.org" class="externalLink" title="External Link">Groovy</a> scripts.</li> </ul> <ul> <li><code>/xdocs</code> - The XML source code for all documentation, including this guide.</li> <li><code>/target</code> - Maven puts all compiled files into this temporary directory.</li> </ul> <p>Next, we'll look at how to build both Struts Scripting library and the included example application.</p> </div> <div class="subsection"><a name="Build_Instructions"></a><h3>Build Instructions</h3> <a name="build"></a> <p>Struts Scripting uses <a href="http://maven.apache.org" class="externalLink" title="External Link">Apache Maven</a> 1.0 to build its jar, example application, documentation, and distribution files. Maven 1.0 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 <a href="http://maven.apache.org" class="externalLink" title="External Link">Apache Maven</a> 1.0 installed and its <code>maven</code> executable available in your command path. </p> <p> 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. </p> <ul> <li><strong>Build the Struts Scripting jar</strong> - Run '<code>maven jar:jar</code>' which will create the jar as <code>/target/struts-scripting-VERSION.jar</code>.</li> <li><strong>Build the Mailreader example</strong> - Run '<code>maven war:war</code>' to create <code>/target/struts-example.war</code>.</li> <li><strong>Build the documentation</strong> - Run '<code>maven site:generate</code>' to create the Struts Scripting website at <code>/target/docs</code>.</li> </ul> <p>While this list only covers a few build targets, there are many other you can discover by typing '<code>maven -g</code>' from the Struts Scripting directory.</p> </div> </div></div></div><div class="clear"><hr></hr></div><div id="footer"><div class="xright">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -