Questions tagged [grails-plugin]

A Grails plugin is a self-contained bundle of functionality that can be installed into a Grails application.

A Grails plugin is a self-contained bundle of functionality that can be installed into a Grails application. When a Grails plugin is installed, it can do any of the following:

  • Define additional Spring beans
  • Modify the generated web.xml file
  • Add new methods to the application's artefacts (controllers, domain classes, services, etc.)
  • Provide new tag libraries
  • Make additional resources and classes available to the application
  • Provide new Grails commands

For example, when you install the jQuery plugin

  • The jQuery JavaScript files are added to the application
  • A new Grails tag <jq:jquery> is added to the application
  • A new Grails command grails install-plugin jquery is added to the application

When you install a Grails plugin, that plugin's functionality is made available to the installing application. However, the plugin itself is not actually copied into the application, only the plugin name and version is added to the application's application.properties file. The plugin itself is downloaded to $HOME/.grails and the application loads it from there.

The structure of a Grails plugin project is identical to that of a Grails application, with the exception of a configuration file (known as a plugin descriptor) that is included in a plugin's root directory.

1510 questions
10
votes
1 answer

Grails with Vaadin plugin, is it the right choice?

For my organization I am evaluating RICH technologies for our next projects. We are currently using grails 2.1.0 and very happy with that, especially with groovy and gorm and we would like to stay with that. The idea is to extend grails with some…
Fabio Sogni
  • 187
  • 1
  • 11
9
votes
3 answers

Spring Security UI and grails 2.0

I am not able to use grails security UI(0.1.2) with Grails 2.0. I have googled the possible causes for following error and also have tried suggested fixes but they don't seem to be working. I have already tried, overriding the UIs, I also have tried…
Sap
  • 5,197
  • 8
  • 59
  • 101
9
votes
2 answers

How to easily implement "who is online" in Grails or Java Application?

I am building a community website in grails (using Apache Shiro for security and authentication system) and I would like to implement the feature "who is online?". This url http://cksource.com/forums/viewonline.php (see snapshot below if you do not…
fabien7474
  • 16,300
  • 22
  • 96
  • 124
9
votes
1 answer

How do I configure logging for a grails plugin?

I'm creating my first grails plugin and I don't know where the logging should be configured. In a normal grails app, there is a conf/Config.groovy file for that, but for a plugin there is none. Is there another way to achieve this ? I would like to…
Philippe
  • 6,703
  • 3
  • 30
  • 50
9
votes
2 answers

How To Call A Taglib As A Function In A Domain Class

I need to call the Static Resources Plugin (http://www.grails.org/Static+Resources+Plugin) from my domain class. This works perfectly in a controller: def tstLink = resourceLinkTo(dir:"docs/${identifier}",file:originalFileName) but in a domain…
Brad Rhoads
  • 1,828
  • 3
  • 29
  • 52
9
votes
1 answer

How to use grails.plugin.location?

I have a plugin project which I created as grails create-plugin myPlugin. I also created a 'normal' grails project as grails create-app myPluginDemo. I'm trying to install myPlugin plugin in myPluginDemo but don't understand how to use…
zoran119
  • 10,657
  • 12
  • 46
  • 88
8
votes
2 answers

Quartz not working in Grails4, Issue in dependency not able to compile

Getting error in Scheduler Dependency i'm using grails4 : Anyone let me know correct dependency for scheduler dependencies { compile "org.grails.plugins:quartz:2.0.1" } and also tried this: dependencies { compile…
Komal Prasad
  • 115
  • 1
  • 7
8
votes
2 answers

How to tie OAuth authentication with Spring Security

I have a Grails 2.5.3 app that currently uses spring security plugin for authentication. Users login using a username/pwd. I have updated the app now to support OAuth authentication (Using ScribeJava). Users can click a link that redirects them to…
Anthony
  • 33,838
  • 42
  • 169
  • 278
8
votes
2 answers

Where can I find the default templates for all the Grails fields plugin types?

I was hopping to have an easy way to customize the display behavior of the Grails fields plugin after reading its docs, but I just realized that it demands an enormous effort as there is no available templates to start from. I can see the display…
Cléssio Mendes
  • 996
  • 1
  • 9
  • 25
8
votes
3 answers

How do I publish a grails 3 plugin to my local nexus repo?

Running grails publish-plugin doesn't seem to do anything, and the only documentation I could find was about publishing to bintray. [edit:] I can publish the plugin via gradle publish, but wondered if there was a grails-y way to do it, and wonder…
Charlotte Tan
  • 2,452
  • 2
  • 20
  • 24
8
votes
1 answer

error while exporting grails 2 plugin to grails 3

I have been trying to upgrade the grails spring-security-ui plugin to grails 3. As mentioned in the docs I have copied all the dependencies to build.gradle. The file looks something like this. buildscript { ext { grailsVersion =…
8
votes
2 answers

null pointer exception with Grails rendering plugin

I have some problems when using rendering plugin.It always returns me a null pointer exception.I saw severeal similar problems but I didn't find where I'm wrong. Code of my template : /views/appRetail/_report.gsp
drieu
  • 187
  • 13
8
votes
3 answers

Grails Detect if a Plugin is Installed

Is there a way in Grails to Detect that a plugin is installed. For example I need to know if the "Acegi" plugin is installed. If it is then I can run different Code. If the plugin is not installed (which is a viable option) then I can run different…
Scott Warren
  • 1,581
  • 1
  • 17
  • 30
8
votes
2 answers

Avoid cyclic reference inheritance in grails

I have a big project written in Grails 2.3.8. Sometimes when I deploy it using my CI I got this message: Unable to complete the scan for annotations for web application [/ProjectName##1152] due to a StackOverflowError. Possible root causes include a…
NiBE
  • 857
  • 2
  • 16
  • 39
8
votes
1 answer

Grails Spring Security plugin: Getting 302 for Ajax Request for timedout Session

We are using Spring Security plugin version 1.2.7.3 with Grails 2.2.1. In my Config.groovy, I do: grails.plugins.springsecurity.auth.ajaxLoginFormUrl = "/mylogin/authAjax" thinking that, when there is an Ajax request, Spring Security will invoke…
dublintech
  • 16,815
  • 29
  • 84
  • 115