|
I am trying to exclude the console plugin from the production war file. Setting
environments { production { grails.plugin.excludes='console' } } in Config.groovy does nothing. In BuildConfig.groovy I have this: grails.war.resources = { stagingDir -> if (System.getProperty('grails.env') == 'production') { delete (includeEmptyDirs: true) { fileset(dir: "${stagingDir}/WEB-INF/classes/", includes : 'ConsoleGrailsPlugin.*,gsp_console*.*' ) fileset(dir: "${stagingDir}/WEB-INF/plugins/console-1.1/" ) } } } The problem is the second exclusion line - the plugins directory is not in the staging dir at the time this closure is called, even though the war file ends up with "WEB-INF/plugins/console-1.1" in it. I found I could "fix" the problem if in _GrailsWar.groovy I moved these lines: warPluginsInternal(compileScopePluginInfos) createDescriptorInternal(compileScopePluginInfos, resourceList) to be BEFORE the call to the buildConfig.grails.war.resources closure. Is that a good thing? Whether it is or not, there must be some far better way to exclude the console plugin - via dependencies or something? |
|
We encountered the same issue recently and we fixed it by replacing runtime by provided before the plugin name in BuildConfig.groovy :
plugins { test ":spock:0.6" runtime ":mongodb:1.0.0.RC4" runtime ":fixtures:1.1" runtime ":hibernate:$grailsVersion" build ":tomcat:$grailsVersion" provided ":console:1.1" runtime ":jquery:1.7.1" compile ":resources:1.1.6" } Read maven documentation (http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html) for better understanding of the different dependency scope. On 27 April 2012 16:05, jphiloon <[hidden email]> wrote: I am trying to exclude the console plugin from the production war file. |
|
Hi, I created a controller : grails create-controller org.grails.twitter.Status 1 package org.grails.twitter 2 3 class StatusController { 4 5 def index() { } 6 } In line 1 there is an error : The type org.springframework.security.core.GrantedAuthority cannot be resolved.
It is indirectly referenced from required .class files Please your help is appreciated. thanks |
|
On Fri, Apr 27, 2012 at 8:17 PM, A. Lotfi <[hidden email]> wrote:
does 'grails refresh-dependencies' fix it? I assume that you have the spring-security-core plugin installed in your project?
--sam |
|
Thank you, I did refresh-dependencies, it's working now. From: Samuel Gendler <[hidden email]> To: [hidden email] Sent: Saturday, April 28, 2012 2:20 AM Subject: Re: [grails-user] The type org.springframework.security.core.GrantedAuthority cannot be resolved. It is indirectly referenced from required .class files On Fri, Apr 27, 2012 at 8:17 PM, A. Lotfi <[hidden email]> wrote:
does 'grails refresh-dependencies' fix it? I assume that you have the spring-security-core plugin installed in your project?
--sam |
| Powered by Nabble | Edit this page |
