在将Grails从1.3.x升级到2.0.4时,Spring Security核心插件出现错误 [英] Error in Spring Security core plugin while upgrading grails from 1.3.x to 2.0.4
问题描述
我在grails 1.3.x中开发了一个应用程序,并将其升级到2.0.4,在Spring安全插件中存在依赖性错误,所以我做了 grails install-plugin spring-security-core
,它安装了1.2.7.3版本。然后我运行了grails应用程序,出现了下面的错误。
编译错误:启动失败:
在编译期间用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:找不到符号
符号:方法saveException(javax.servlet.http.HttpServletRequest, org.springframework.security.core.AuthenticationException)
location:class org.codehaus.groovy.grails.plugins.springsecurity.AjaxAwareAuthenticationFailureHandler
saveException(request,exception);
^
然后我添加了 compile':spring-security-芯:1.2.7.3'
。我得到了一个不同的错误,如下所示
::::警告
:::::::::: ::::::::::::::::::::::::::::::::::::
::未解决的依赖关系::
:::::::::::::::::::::::::::::::::::::::::: ::::
::#spring-security-core; 1.2.7.3:java.text.ParseException:在'http://插件
s.grails中找到不一致的模块描述符文件.org / grails-spring-security-core / tags / RELEASE_1_2_7_3 / spring-security-core-1.2.7.3.pom':bad organization:expected =''found ='o
rg.grails.plugins';
:::::::::::::::::::::::::::::::::::::::::: ::::
::::错误
grailsCentral:在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'
我参考了此jira问题,根据我们必须改变依赖到运行时,但它给了我下面的错误
找到的不一致模块描述符文件'http://plugins.grails.org/grails-spring-security-core/tags/RELEASE_1_2_7_3/spring-security-core-1.2.7.3.pom':bad organization:expected =''found ='org.grails。插件;
那么,如何解决这个问题。
部分中,插件
部分: 插件{
运行时:hibernate:$ grailsVersion
build:tomcat:$ grailsVersion
...
compile:spring-security-core:1.2.7.3'
}
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.
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'
}
这篇关于在将Grails从1.3.x升级到2.0.4时,Spring Security核心插件出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!