grails-plugin

Custom Plugin transitive Dependency resolution in BuildConfig.groovy Grails 2.2.3

可紊 提交于 2019-12-04 14:32:18
tl;dr version Dependencies of my custom grails plugin weren't getting inherited and resolved by projects I installed the plugin to. Install the latest version of the release plugin to your plugin (fixes the issue for jar dependencies) Clear out any references to plugins that might exist in your BuildConfig.groovy file (fixes the issue for plugin dependencies) grails maven-install to make the plugin available in the mavenLocal() source Long version So, I've been trying to create a custom grails plugin for internal use at my University. I'd really like it if putting the plugin in your

handle successful login event with spring security

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 10:32:42
My Grails app uses the Spring Security plugin. Whenever a user successfully logs in I want to: store something in the session redirect them to a custom page (depending on their role) I need to handle logout events similarly, which was pretty straightforward because the plugin provides a bean named logoutSuccessHandler that can be overriden. I was hoping to similarly find a bean named loginSuccessHandler , but no such luck. I read the page in the plugin's docs about event handling , but neither of the event handling mechanisms appears to give me access to the current request or session. Sudhir

Grails Problem with custom error messages

穿精又带淫゛_ 提交于 2019-12-04 09:14:11
问题 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 default error codes message, it will correctly display the new error message default.blank.message=Property [{0}] of class [{1}] cannot be blank However, this is not what I am trying to do. I need more granular error reporting and have more than one

How to setup Grails and AngularJS partial templates

狂风中的少年 提交于 2019-12-04 07:38:46
I am realizing a project using AngularJS for the front end , and Grails for the backend. Angular JS => Single page application Grails => REST API to be used in the WebApp itself and 3rd party apps. This is how I setup the project: web-app | |_____ js ( angular controllers, modules, partial templates.) | |_____ images | |_____ css grails-app | |_____ views ( in here I have my main view, the one I use at the first user request ) Rather than using the Resources Plugin, I prefer building my own front end with Grunt, and then I only link the final files inside the layout itself. I structured the js

How do I modify a column using Grails' database migration plugin's Groovy DSL?

半城伤御伤魂 提交于 2019-12-04 07:08:54
Can you give me an example of a groovy changeset using the modifyDataType method? I tried this: databaseChangeLog = { changeSet(author: "user", id: "5-1") { modifyDataType(tableName: "test", columnName: "description4", newDataType: "int(11)") } } But modifyDataType is not recognized. I also tried modifyColumn , but I get the same result. The underlying question is: What kind of tags does the dsl support, and how are they used? All Liquibase refactorings should work - the Groovy DSL mirrors the Liquibase XML. I didn't have a test for modifyDataType but added it to my test script and it worked

In Grails, the command “tomcat:deploy” does not generate the complete war as the command “dev war” does

╄→尐↘猪︶ㄣ 提交于 2019-12-04 06:19:53
问题 The command "grails dev war" deploys perfectly in my local Tomcat6 server with a generated war which contains the next folders: css images js META-INF plugins WEB-INF Unfortunately, I need that the command tomcat:deploy works too (I'm actually using: tomcat:redeploy -DskipTests). But Tomcat gives the next error : 2013-05-23 05:12:53,094 [http-8080-4] ERROR digester.Digester - Parse Fatal Error at line 1 column 1: Final de archivo prematuro. org.xml.sax.SAXParseException; systemId: jndi:

Grails hangs on command line

血红的双手。 提交于 2019-12-04 05:28:34
I just downloaded Grails 2.0.1. Created a new project and then tried adding the mysql connector as per the documentation but Grails hangs at command prompt without any message. I tried to execute in verbose and stacktrace mode but it prints nothing. I tried cleaning and re-executing but all the grails commands are getting stuck. They don't print anything beyond "configuring classpath" message . Please help. Thanks Cleaning .ivy cache helps $HOME/.grails/ivy-cache Had the same problem on grails 2.0.4. The cause was one of the repos not responding and grails waits for it to timeout. Setting log

Grails client side validation

只愿长相守 提交于 2019-12-04 05:10:20
How do you (if you) manage client side validation with grails ? Do you use a plugin or do you mirror your constraints using a javascript framework ? Cheers leebutts I haven't used them personally but these two plugins might help you out: http://grails.org/plugin/javascript-validator http://www.grails.org/plugin/remote-constraints On Grails projects that I've been a part of, We haven't used a plugin but rather a mashup of javascript plugins and custom validators (jQuery plugins, Prototype, Dojo, etc.) to achieve the client side validation. Its handy to provide instant field-level validation on

Grails 3.0 adding an inline plugin

﹥>﹥吖頭↗ 提交于 2019-12-03 21:01:16
I created simple grails 3.0 applications using commands below: create-app admin --profile=web create-plugin core --profile=plugin Now, I wanted to use core as an inline plugin in admin build, which is a web application. We can easily do that in grails version < 3.0 in buildconfig. Where can I do that in grails 3.0. Every help is worth appreciated. Inplace plugins have been replaced by multi project Gradle builds. See the Grails 3 functional test suite for an example https://github.com/grails/grails3-functional-tests Recently I used an inline plugin in my grails 3 application. here is how I did

Using grails datasources in quartz plugin

跟風遠走 提交于 2019-12-03 20:33:21
I want to create quartz jobs that use a JdbcStore as described in the clustering section of the docs , in Burt's example. The example shows how to configure quartz using a quartz.properties file. Now, I'd like my jdbc store to be the same database as my grails application, so that I have less settings to duplicate. So, assuming I manually create the required tables in my database, is it possible to use the default dataSource configured in Datasource.groovy with the quartz plugin ? I'm using grails 2.4.4 and quartz 1.0.2. In other terms, can I add my settings to QuartzConfig.groovy rather than