Grails-SpringSec depends on JARs that aren't i

2019-08-04 04: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条回答
Deceive 欺骗
2楼-- · 2019-08-04 04:52

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

查看更多
登录 后发表回答