1

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.

DirtyMikeAndTheBoys
  • 1,077
  • 3
  • 15
  • 29
  • 1
    Latest version of [Spring Security Core](http://grails.org/plugin/spring-security-core) is 2.0-RC2 and that of [Spring Security cas](http://grails.org/plugin/spring-security-cas) is 2.0-RC1. I know the latest version of SSC is used widely. Do you face any problem using them? – dmahapatro Apr 29 '14 at 14:24
  • Thanks @dmahapatro (+1) - please see my error above. – DirtyMikeAndTheBoys Apr 29 '14 at 16:36
  • 1
    Do you have `mavenRepo "http://repo.spring.io/milestone/"` added to BuildConfig as mentioned in both of the plugins? – dmahapatro Apr 29 '14 at 16:58
  • Thanks @dmahapatro (+1) - no I don't but will try it. Just out of curiosity, why aren't these in `mavenCentral`? If its because they are RCs ("bleeding edge"), then I'm simply looking for the latest version of them that *would* be in `mavenCentral`. Thanks again! – DirtyMikeAndTheBoys Apr 29 '14 at 17:14
  • And to answer your question @dmahapatro, **no**, adding your `mavenRepo` config didn't fix the errors. – DirtyMikeAndTheBoys Apr 29 '14 at 17:17

1 Answers1

4

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

KrishVilay
  • 66
  • 6