You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by we...@apache.org on 2010/04/30 15:13:44 UTC
svn commit: r939656 - in /myfaces/extensions/scripting/trunk/src/site/xdoc:
configentries.xml using_advanced.xml
Author: werpu
Date: Fri Apr 30 13:13:43 2010
New Revision: 939656
URL: http://svn.apache.org/viewvc?rev=939656&view=rev
Log:
https://issues.apache.org/jira/browse/EXTSCRIPT-125
Modified:
myfaces/extensions/scripting/trunk/src/site/xdoc/configentries.xml
myfaces/extensions/scripting/trunk/src/site/xdoc/using_advanced.xml
Modified: myfaces/extensions/scripting/trunk/src/site/xdoc/configentries.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/src/site/xdoc/configentries.xml?rev=939656&r1=939655&r2=939656&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/src/site/xdoc/configentries.xml (original)
+++ myfaces/extensions/scripting/trunk/src/site/xdoc/configentries.xml Fri Apr 30 13:13:43 2010
@@ -52,7 +52,7 @@
<td>scriptingFilter</td>
<td>YES</td>
<td></td>
- <td>The scripting filter for further information look below</td>
+ <td>The scripting filter for further information look <a href="#scriptingFilter">below</a></td>
</tr>
@@ -111,12 +111,61 @@
</tbody>
</table>
- <section name="Navigation Bottom">
- <a href="setup_steps.html"><<Back to the appendix: Setup steps</a>
- or
- <a href="exampleconfig.html">On to the appendix: Example Configuration>></a>
- </section>
+
+
+
+ </section>
+
+ <section name="Normal configuration entries">
+ <p>all configuration entries except for the scripting filter follow the context parameter convention</p>
+ <source><![CDATA[
+ <context-param>
+ <description>
+ Initializes the plugins for our scripting support
+ </description>
+ <param-name>org.apache.myfaces.FACES_INIT_PLUGINS</param-name>
+ <param-value>org.apache.myfaces.extensions.scripting.servlet.StartupServletContextPluginChainLoader</param-value>
+ </context-param>
+ ]]>
+ </source>
+
+ </section>
+
+ <section name="Scripting Filter">
+ <a name="scriptingFilter" />
+ <p>All configuration entries are context parameters, the only exception is the scripting filter which is a servlet filter</p>
+ <p>The scripting filter differs in its configuration by having to provide a servlet filter tag and a pattern:</p>
+
+ <source><![CDATA[
+ <!-- ======================================================================================
+ Scripting Filter
+ Second step to enable Ext-Scripting
+ ====================================================================================== -->
+ <filter>
+ <filter-name>scriptingFilter</filter-name>
+ <filter-class>org.apache.myfaces.extensions.scripting.servlet.ScriptingServletFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>scriptingFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ <dispatcher>ERROR</dispatcher>
+ </filter-mapping>
+ ]]>
+ </source>
+ <p>Note for further examples of the configuration go to the section <a href="exampleconfig.html">On to the appendix: Example Configuration>></a> </p>
</section>
+
+
+ <section name="Navigation Bottom">
+ <a href="setup_steps.html"><<Back to the appendix: Setup steps</a>
+ or
+ <a href="exampleconfig.html">On to the appendix: Example Configuration>></a>
+ </section>
+
+
</document>
Modified: myfaces/extensions/scripting/trunk/src/site/xdoc/using_advanced.xml
URL: http://svn.apache.org/viewvc/myfaces/extensions/scripting/trunk/src/site/xdoc/using_advanced.xml?rev=939656&r1=939655&r2=939656&view=diff
==============================================================================
--- myfaces/extensions/scripting/trunk/src/site/xdoc/using_advanced.xml (original)
+++ myfaces/extensions/scripting/trunk/src/site/xdoc/using_advanced.xml Fri Apr 30 13:13:43 2010
@@ -439,6 +439,78 @@
</subsection>
</section>
+
+
+ <section name="Build Process and Multiuser Environments">
+ <p>While Ext-Scripting itself is only used for rapid prototyping following two szenarii will probably occur in a typical
+ user development environment</p>
+ <subsection name="Compiling the Groovy classes for the final build">
+ <p>while it makes sense to have the Groovy sources for editing, for the final deployment, it makes sense
+ to just deliver the classes instead of the source files.
+ While doing that for your ide is out of scope of this documentation (currently). The documentation can provide you the information on how
+ to do it in Apache Maven:</p>
+ <p> The trick is to combine two things. Apache Maven 2 profiles and the Apache Maven2 groovy plugin</p>
+ <p> For a short explanation on Apache Maven 2 profiles please follow this link: <a href="http://maven.apache.org/guides/introduction/introduction-to-profiles.html">Apache Maven 2 Profiles</a> </p>
+ <p> The idea is, to define a deployment profile which triggers the Maven 2 groovy plugin which then will compile your classes, here is an example
+ configuration of such a profile, which can be copy pasted into your build file</p>
+
+ <source><![CDATA[
+ <profiles>
+ <profile>
+ <id>deployment</id>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.gmaven</groupId>
+ <artifactId>gmaven-plugin</artifactId>
+ <version>1.2</version>
+ <configuration>
+ <providerSelection>1.7</providerSelection>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>generateStubs</goal>
+ <goal>compile</goal>
+ <goal>generateTestStubs</goal>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.codehaus.groovy</groupId>
+ <artifactId>groovy-all</artifactId>
+ <version>1.7.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </profile>
+ </plugins>
+ </profiles>
+ ]]></source>
+
+ <p>The standard settings of the groovy maven plugin is that it will use your src/main/groovy directory as the path to pickup the sources.
+ You either can use that one and adjust the corresponding org.apache.myfaces.extensions.scripting.groovy.LOADER_PATHS setting for editing.
+ Or you can readjust the corresponding plugin settings of the Groovy Maven plugin. Follow this <a href="http://groovy.codehaus.org/GMaven">link</a> for further information.
+ </p>
+ <p> A call to maven clean install -P deployment now triggers the groovy compile task. You also can use the extended features
+ of the maven profiles to automate the switch if you use maven also for deployment of your project.</p>
+
+
+
+
+ </subsection>
+ <subsection name="Compiling the Groovy classes for the final build">
+ <p>One problem you might have noticed is, that if you do not work with the default configuration on your sources
+ (aka. WEB-INF/<scripting-language>, you have to rely on the corresponding configuration entries, which in itself take absolute paths.
+ One user of the system came up with the question, on how to deal with multiple developers. The answer is plain and simple, unfortunately the
+ support of such a use case could be better for 1.0, all you can do is either to rely on the default paths, or use your build system to handle
+ the configuration parts per user, or standardize on the same file structure for every user.
+ Additional support for this scenario will be added post 1.0 to ease this usecase but for now it is a known but not entirely solved problem.
+ </p>
+ </subsection>
+ </section>
+
<section name="Navigation Bottom">
<a href="using_general.html"><<Back to the General Users Guide</a>
or