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
23
votes
1 answer

Error Failed to resolve dependencies grails

I get Error Failed to resolve dependencies error when I try to run, clean, or compile. My BuildConfig.groovy file is as follows: grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0) grails.project.class.dir…
Syam
  • 575
  • 2
  • 8
  • 25
22
votes
4 answers

Grails 3 and Spring Security Plugin

I've just recently started working with Grails, and I'd like to test out the Spring Security Plugin. I'm using Grails v3.0.0RC2, and I'm finding it difficult to come across accurate documentation for it with a lot of things. I'm looking at the…
ekbarber
  • 588
  • 1
  • 4
  • 9
22
votes
2 answers

Grails 2.3.4 - Error executing script Clean: _GrailsClasspath_groovy$_run_closure1

I am using eclipse kepler and after shutting down my computer and turning it on again I am getting this error message: grails run-app --stacktrace |Loading Grails 2.3.4 |Configuring classpath . |Environment set to development .Error | Error…
Carol.Kar
  • 4,581
  • 36
  • 131
  • 264
18
votes
5 answers

How to run a local plugin in Grails 2.0?

In Grails, there is a variant how to include local plugin from sources. According to docs, one may type in BuildConfig.groovy: // Useful to test plugins you are developing. grails.plugin.location.shiro = …
Dmitry Kurinskiy
  • 533
  • 1
  • 3
  • 16
17
votes
3 answers

Grails Resources Plugin and AJAX loaded javascript

I added the resources plug-in in a grails 1.3.7 application and everything works fine except javascript that is loaded asynchronously. So if I have a template that contains a // javascript here and load it via ajax the js…
sikrip
  • 671
  • 8
  • 10
16
votes
2 answers

Grails Spring Security: redirect after login success/failure

I'm using version 1.2 of the Spring Security plugin in a Grails application. I want login attempts to be handled in the following way: Success if the login was triggered by an attempt to access a protected page, send them to that page if the user…
Dónal
  • 185,044
  • 174
  • 569
  • 824
14
votes
3 answers

Method on class [] was used outside of a Grails application. If running in the context of a test using the mocking API or bootstrap Grails Correctly

PROBLEM I know there is already a question in regards to this but I think that the issue that causes might be different based on what they are saying. I have the following setup: grails version: 2.3.4 Hibernate plugin: runtime…
Viriato
  • 2,981
  • 7
  • 40
  • 54
13
votes
3 answers

What is a Grails Plugin? What does it mean to Install a Plugin?

I used Grails recently, and added Grails plugin for JQuery, but I don't think it did anything more than just copy some jQuery files over. So far, I have seen info only on 'how to install and use' plugins...but I can't find anything that describes…
rk2010
  • 3,481
  • 7
  • 27
  • 39
13
votes
3 answers

How to install Grails plugin from source code?

I got a source code of the plugin from a friend, but still don't know how to install it into my project. Yes, there's install-plugin command, but this plugin isn't allowed to upload to the root grails plugin directory. How can I install grails…
Hoàng Long
  • 10,746
  • 20
  • 75
  • 124
13
votes
5 answers

Grails Problem with custom error messages

I am currently trying to specify custom error messages in grails for the default constraints but so far all I get back is the default error message. I know that I have to edit the grails-app/i18n/messages.properties file If I change the following…
mh377
  • 1,656
  • 5
  • 22
  • 41
12
votes
1 answer

Is there an equivalent to the Bootstrap class in a Plugin

Is there an a way to initialise some data in a Plugin. I am modulizing my code and it would be nice to have something like the bootstrap in the Plugin but I cannot find it. Nor can I find references using the Google.
Scott Warren
  • 1,581
  • 1
  • 17
  • 30
12
votes
3 answers

Failed to resolve dependencies during grails plugins installation

I deleted my .grails folder from my PC and when I opened an application in Intellij IDE, the plugins mentioned in buildConfig.groovy start installing. A few plugins were installed but six plugins were unable to install. The following error…
Sikander
  • 834
  • 2
  • 10
  • 33
11
votes
6 answers

Grails database migration plugins

There are at least two Grails plugins that emulate the database migration functionality of Rails: Autobase Liquibase Is there a consensus about which of these is best, or is there another plugin that does database migration better than either of…
Dónal
  • 185,044
  • 174
  • 569
  • 824
11
votes
2 answers

Change login page for spring security plugin in grails

Is there a way that I can create my own custom login page and send the data to login controller of spring security plugin. I currently see my code redirecting directly to the default login page of spring security plugin.
Rammohan
  • 493
  • 6
  • 27
10
votes
2 answers

Could not get resource 'https://nodejs.org/dist/v14.19.3/ivy.xml'

I am getting this Gradle error today (it worked fine before). Thank you in advance for your help. Execution failed for task ':nodeSetup'. Could not resolve all dependencies for configuration 'detachedConfiguration16'. Could not resolve…
Jack Cui
  • 101
  • 3
1
2 3
99 100