Grails-SpringSec depends on JARs that aren't in Maven Central?

浪子不回头ぞ 提交于 2019-12-11 10:35:48

问题


I am trying to configure a Grails app to use the latest stable SpringSec-CAS plugin and for the life of me cannot find the proper version of both SpringSec and the plugin I should be using.

I am on Grails 2.3.6. What should I include in BuildConfig.groovy to get the latest stable versions? I have:

plugins {
    compile  ":spring-security-core:2.0-RC2"
    compile  ":spring-security-cas:2.0-RC1"
}

When I specify SpringSec 2.0-RC2 and SpringSec-CAS 2.0-RC1 I get the following errors when running grails run-app:

| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.springframework.security:spring-security-web:jar:3.2.0.RC1, org.springframework.security:spring-security-cas:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-web:jar:3.2.0.RC1 in mylocalartifactory_artifactory_libs-snapshots-local_ (http://mylocalartifactory/artifactory/libs-snapshots-local/) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.springframework.security:spring-security-web:jar:3.2.0.RC1, org.springframework.security:spring-security-cas:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-web:jar:3.2.0.RC1 in mylocalartifactory_artifactory_libs-snapshots-local_ (http://mylocalartifactory/artifactory/libs-snapshots-local/) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.springframework.security:spring-security-web:jar:3.2.0.RC1, org.springframework.security:spring-security-cas:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-web:jar:3.2.0.RC1 in mylocalartifactory_artifactory_libs-snapshots-local_ (http://mylocalartifactory/artifactory/libs-snapshots-local/) (Use --stacktrace to see the full trace)
| Error The following artifacts could not be resolved: org.springframework.security:spring-security-web:jar:3.2.0.RC1, org.springframework.security:spring-security-cas:jar:3.2.0.RC1: Could not find artifact org.springframework.security:spring-security-web:jar:3.2.0.RC1 in mylocalartifactory_artifactory_libs-snapshots-local_ (http://mylocalartifactory/artifactory/libs-snapshots-local/)

I take it that I don't have my repositories set up correctly...? How can I modify my BuildConfig.groovy to pull these deps in from Maven Central?

Running Grails dependency report:

+--- org.grails.plugins:spring-security-core:2.0-RC2
|    >>>> org.springframework.security:spring-security-web:3.2.0.RC1
+--- org.grails.plugins:spring-security-cas:2.0-RC1
|    \--- org.jasig.cas.client:cas-client-core:3.2.1
|    >>>> org.springframework.security:spring-security-cas:3.2.0.RC1

Still not 100% sure what the problem is.


回答1:


Adding mavenRepo "http://repo.spring.io/milestone/" resolved the dependency issue for me.



来源:https://stackoverflow.com/questions/23367266/grails-springsec-depends-on-jars-that-arent-in-maven-central

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