grails-plugin

How to configure Grails plugin to override Log4J settings for “parent” apps?

限于喜欢 提交于 2019-12-11 04:53:02
问题 I'm writing a Grails plugin that will impose very specific log4j settings (in its own log4j.xml ), and I would like to configure it such that an app which uses this plugin is forced to use the plugin's log4j configuration (instead of any log4j configs that the app itself has defined). For example, let's say I want the plugin to force all downstream Grails apps to log to a file called /var/log/fizz.log . How could I make this work? Update : And if it's not possible for the plugin to override

Grails Liferay portlet not invoking action

别说谁变了你拦得住时间么 提交于 2019-12-11 04:22:35
问题 I am trying to create a simple portlet for Liferay 5.2.2 using Grails 1.2.1 with the grails-portlets 0.7 and grails-portlets-liferay 0.2 plugins. I created and deployed a stock portlet (just updated title, description, etc...). It deploys correctly and the view renders correctly. However, when I submit the default form that is in view.gsp it never hits the actionView function. Here are the relevant code bits: SearchPortlet.groovy class SearchPortlet { def title = 'Search' def description = ''

Can't run Grails app with mongodb plugin version 3.0.3

坚强是说给别人听的谎言 提交于 2019-12-11 03:59:05
问题 I'm trying to upgrade my mongodb plugin from 2.0.1 to 3.0.3. However I keep getting the following error: java.lang.NoClassDefFoundError: com/mongodb/AggregationOptions at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2531) at java.lang.Class.getDeclaredMethods(Class.java:1855) at org.codehaus.groovy.reflection.CachedClass$3$1.run(CachedClass.java:84) at java.security.AccessController.doPrivileged(Native Method) at org.codehaus

Grails 2.3 - New Sample Project not working

只愿长相守 提交于 2019-12-11 03:56:33
问题 i created a new grails 2.3 sample project. It is giving error while refresh-dependencies or run-app Loading Grails 2.3.0.M1 | Configuring classpath | Error org.sonatype.aether.collection.DependencyCollectionException: Failed to collect dependencies for [xalan:serializer:jar:2.7.1 (compile), org.grails:grails-bootstrap:jar:2.3.0.M1 (compile), org.grails:grails-scripts:jar:2.3.0.M1 (compile), org.grails.plugins:tomcat:zip:7.0.39 (compile)] | Error at org.sonatype.aether.impl.internal

How can I exclude a plugin from grails default gsp encoding?

佐手、 提交于 2019-12-11 03:51:53
问题 I'm working in a grails application that is using default encoding of html for all gsp pages: grails { views { gsp { encoding = 'UTF-8' codecs { expression = 'html' scriptlet = 'html' taglib = 'none' staticparts = 'none' } } } } This is great and removes XSS vulnerabilities from the vast majority of the application, but some plugins in the application include HTML in grails variables which are rendered on the GSPs in the plugins. Without modifying the plugin, I can't add the raw() method

How to add or install plugins in grails-3.0.4 which i have used in grails-2.4.4 while upgrading application

谁都会走 提交于 2019-12-11 03:31:34
问题 1) How to add or install plugins in 3.0.4 like in 2.4.4 we can install by specifying in BuildConfig.groovy? 2) How to create new plugins and copy source code to new plugins from original plugins as documentation saying to do for up-gradation of plugins in grails-3.x? 回答1: You add your plugins into the dependencies block in your build.gradle . You find plugins here - as stated on the plugin page. Follow the instructions in the Upgrading from Grails 2.x - Reference Documentation 回答2: In a

How to add plugin dependencies to pom.xml

允我心安 提交于 2019-12-11 02:55:02
问题 I have created a plugin which has other plugins as plugin dependencies in BuildConfig.groovy : grails.project.dependency.resolution = { .... plugins { build(":release:3.0.0", ":rest-client-builder:1.0.3") { export = false } // my dependencies compile ':spring-security-core:1.2.7.2' compile ":spring-security-ldap:1.0.6" } } How can I make sure that when someone installs my plugin they don't have to install spring-security-core and spring-security-ldap manually? I want dependency management to

Grails 3 - where's the DataSource.groovy and about plugins

怎甘沉沦 提交于 2019-12-11 01:17:30
问题 So I downloaded Grails 3 M1 and created a project. There's no DataSource.groovy, even after the MySQL driver was added to the dependencies - I thought maybe it will see the driver and know a DataSource.groovy is needed. Secondly, plugins. I found the Grails 3 plugin page (https://github.com/grails3-plugins) How does one go about installing these? Is there a new repository? E.g. the newest Scaffolding plugin on Maven is from March 2014. Will the older plugins still work? Thanks. 回答1: Starting

Use grails plugin datasource

Deadly 提交于 2019-12-11 00:14:07
问题 I'm using Grails 2.2.4 to build a plugin. The plugin is an access manager and need to access some datasources (more than one). As the Grails manual specify in Providing Basic Artefacts, the DataSource.groovy is not bundled with the plugin. Is there a way to "copy" the datasources defined on the plugin DataSource.groovy file to the application's DataSource.groovy file that uses the plugin? I really don't want to manually define the plugin datasources on every application that uses the plugin.

Running a Grails 3 project with in line plugins

柔情痞子 提交于 2019-12-10 18:32:42
问题 I'm almost certain this is a stupid question but I do not know the answer to it :) I'm in the process of upgrading a project of mine from Grails 2.5 to 3 and trying to get to grips with the new inline plugin structure, the old way was working fine but struggling to get the new way working. I have a directory structure as follows: / /settings.gradle /myApp #contains a grails 3 application /myPlugin1 #contains a grails 3 plugin /myPlugin2 #contains a grails 3 plugin /settings.gradle contains: