You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by Apache Wiki <wi...@apache.org> on 2010/03/09 16:23:42 UTC
[Myfaces Wiki] Update of "Extensions/Scripting/Setup" by WernerPunz
Dear Wiki user,
You have subscribed to a wiki page or wiki category on "Myfaces Wiki" for change notification.
The "Extensions/Scripting/Setup" page has been changed by WernerPunz.
The comment on this change is: replacing the original configuration with the bundle configuration which is easier and does not need any matrix.
http://wiki.apache.org/myfaces/Extensions/Scripting/Setup?action=diff&rev1=15&rev2=16
--------------------------------------------------
Depending on your configuration and preferred JDK version you can add following entries to your Maven '''pom.xml''' to enable '''Ext-Scripting'''
- * JDK 5 + JSF 1.2
+ * MyFaces 1.2.8+
{{{
- <dependency>
+ <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
+ <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>core</artifactId>
+ <artifactId>extscript-myfaces12-bundle</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0-SNAPSHOT</version>
- </dependency>
+ </dependency>
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>myfaces12-extensions</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
}}}
- As you can see two imports, the core, which is basically the kernel of '''Ext-Scripting''' and the MyFaces 1.2 extension.
+ * MyFaces 2.x
- Extension scripting is highly modular, a very small core defines the base behavior of the system with extensions supporting various aspects.
-
- The same configuration under Java 6 would look like:
{{{
- <dependency>
+ <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
+ <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>core</artifactId>
+ <artifactId>extscript-myfaces20-bundle</artifactId>
- <version>1.0-SNAPSHOT</version>
+ <version>1.0-SNAPSHOT</version>
- </dependency>
+ </dependency>
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>myfaces12-extensions</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>core-java6</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
}}}
- In this configuration the java compiler API is used if a valid java 6+ installation is present and used.
-
- For MyFaces 2.0 following configurations are valid
-
- {{{
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>core</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>myfaces20-extensions</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- }}}
- for a java 5 environment
-
- {{{
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>core</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>myfaces20-extensions</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.apache.myfaces.extension-scripting</groupId>
- <artifactId>core-java6</artifactId>
- <version>1.0-SNAPSHOT</version>
- </dependency>
- }}}
- For a java 6 environment.
-
- Following Image shows the connection between the various extensions and the core, currently available.
-
- . {{http://people.apache.org/~werpu/images/ext-scripting-structure.jpg||height="285px",width="228px"}}
==== web.xml Filter ====
'''Ext-Scripting''' relies on several entries to be present in the web.xml to function properly.
@@ -144, +86 @@
{{{
<url-pattern>*.jsf</url-pattern>
}}}
+
+
==== web.xml Root Sourcepaths ====
+
Since the goal of '''Ext-Scripting''' is to provide scriptability to a running web application it has to know where to find the sources it has to process. For this a default location has been chosen according to the standards set by the Mojarra Groovy extension the location looks like:
{{{
<webapp>/WEB-INF/groovy
}}}
+
as root location for Groovy files
{{{