Sign in to edit and +1 items.
Login required
Download

Apache Pivot Plugin for Grails

(1)
Author(s) Sandro Martini
Current Release 1.0.2   (2 months ago)
Grails Version 2.0.0 > *
Tags
Dependency
compile ":apache-pivot-grails:1.0.2"
Apache Pivot plugin allows your Grails application to use Apache Pivot 2.x features on Server side, and (if enabled the JarDownloadServlet in web.xml) even to forward Pivot jars to Clients, to be able to reuse them even in Applets and Java Web Start Applications.
Last updated by smartini 1 month ago
Download the zip from the Download link (and follow links in the destination page), then install it, but note that the usual (old) way:

grails install-plugin  /path/to/plugin/(absolute or relative)/grails-apache-pivot-grails-<version>.zip

has been deprecated in Grails-2.0.x, so the new way is to add the following block in BuildConfig.groovy, under the plugins section (at the end of the file):

compile "pivot_stuff:apache-pivot-grails:<version>"
and copy the plugin zip under the webapp lib folder, then run grails clean , then grails compile , and the plugin should be installed.

In case of Errors during plugin installation, Set log level to 'warn' in BuildConfig.groovy to get more information, and retry. Instead of the compile it's possible even to use runtime, and in that case simply running a grails console should be enough.

One time installed, you can safely move in a backup folder or delete the plugin zip just copied, but if the project folder (under the user home folder) is deleted, the plugin should be reinstalled. Instead, running a grails war (with the plugin zip still under the lib folder) doesn't put it in the generated war, so should be safe even to keep it there.

Last updated by smartini 2 months ago
This Plugin contains only "standard" Pivot jars (not Pivot dependencies) so they can be used at Server side in the Grails webapp.

But to simplify some things even at Client Side, the plugin provides some Servlets (which if needed have to be enabled by hand in web.xml, so in this case you have to do a "grails install-templates" before enabling them), for example to forward to client side even Pivot jars used at server side. Note that all Servlets here have been designed with Security in mind, so they (if/when enabled) have good and safe defaults. For all Configuration options of those Servlets please look at sample web.xml and related documentation in its project.

For detailed Usage Notes and other info, please look at documents here: Pivot-Stuff Wiki

A Sample Grails project with the plugin already installed and configured (as described in Usage Notes), with some additional jars and sample pages is available here: Pivot-Stuff Downloads

Apache Pivot, Pivot, Apache, and the Apache Pivot project logo are trademarks of The Apache Software Foundation.

Apache Pivot , Apache Software Foundation

Last updated by smartini 1 month ago

FAQ:

  • under the Download area, you can find even a apache-pivot-grails-sample-src-<version>.zip with a Grails webapp created from scratch, with the plugin of that version already installed, and additional jars and sample pages, so you can use it as a quickstart
  • to show Output from Plugin Servlets (that use only the standard Container log method), add the following lines to grails-app/Config.groovy
// optional, add higher logging level for the given package
    // info "pivot_stuff.web.servlets"  // pivot_stuff servlets
    // -- disabling it because it has not effect, end:
    // enable this to show output even from pivot_stuff servlets (that use Servlet Container standard log method)
    // -- note that a lot of log will be written (to console, thanks to the current configuration) …
    all  "org.apache.catalina"
    // -- so, enable only when/if needed ...
then maybe add an higher logging level to each Servlet by tweaking its init settings in web.xml
  • the latest plugin version compatible with Grails-1.3.7 is the 1.0.1a, while starting from 1.0.2 the minimum Grails version required is 2.0.0
Last updated by smartini 2 months ago

Screenshots

Sample Screenshots, from a test run with sources from apache-pivot-grails-sample-src-<version>.zip

Sample Index page: