Error in Spring Security core plugin while upgrading grails from 1.3.x to 2.0.4

女生的网名这么多〃 提交于 2019-12-12 01:43:39

问题


I have a app developed in grails 1.3.x and I upgraded to 2.0.4, There was an dependency error in the spring security plugin, so i did grails install-plugin spring-security-core, It installed 1.2.7.3 version. Then I ran the grails application, I got the below error.

Compilation error: startup failed:
Compile error during compilation with javac.
C:\Users\Vinay.hs\.grails\2.0.4\projects\steer\plugins\spring-security-core-1.2.7.3\src\java\org\codehaus\groovy\grails\plugins\springs
ecurity\AjaxAwareAuthenticationFailureHandler.java:48: cannot find symbol
symbol  : method saveException(javax.servlet.http.HttpServletRequest,org.springframework.security.core.AuthenticationException)
location: class org.codehaus.groovy.grails.plugins.springsecurity.AjaxAwareAuthenticationFailureHandler
                        saveException(request, exception);
                        ^

Then I added compile ':spring-security-core:1.2.7.3'. I got a different error as below

:::: WARNINGS
                ::::::::::::::::::::::::::::::::::::::::::::::

                ::          UNRESOLVED DEPENDENCIES         ::

                ::::::::::::::::::::::::::::::::::::::::::::::

                :: #spring-security-core;1.2.7.3: java.text.ParseException: inconsistent module descriptor file found in 'http://plugin
s.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='o
rg.grails.plugins';

                ::::::::::::::::::::::::::::::::::::::::::::::


:::: ERRORS
                grailsCentral: bad organisation found in http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spr
ing-security-core-1.2.7.3.pom: expected='' found='org.grails.plugins'

I referred this jira issue, According to that we have to change the dependency to runtime, but it it was giving me the below error

    inconsistent module descriptor file found in 'http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom': bad organisation: expected='' found='org.grails.plugins';

So, How to resolve this issue.


回答1:


Looks like you put the dependency in the BuildConfig.groovy dependencies section but it should be in the plugins section:

plugins {
   runtime ":hibernate:$grailsVersion"
   build ":tomcat:$grailsVersion"
   ...
   compile ':spring-security-core:1.2.7.3'
}


来源:https://stackoverflow.com/questions/13338824/error-in-spring-security-core-plugin-while-upgrading-grails-from-1-3-x-to-2-0-4

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!