I am using grails 2.3.3 via a GGTS 3.4.0 in a development application and I now want to start to use the Spring security core plugin.
I have tried to include it, unsuccessfully, in my application build by adding into plugin part of the BuildConfig.groovy file the line:
compile "org.grails.plugins:spring-security-core:2.0.0"
But get this dependency error on that plugin when doing a run-app:
Resolve error obtaining dependencies: Failed to resolve dependencies
looking at another note I tried:
compile "org.grails.plugins:spring-security-core:2.0-RC2"
in the plugin part of the buildconfig file and:
mavenRepo 'http://repo.spring.io/milestone'
in the repositories part of the the file with the same dependency error issue.
Have I got the wrong version of the plugin for the version of grails/GGTS that I'm using?
Here is the current BuildConfig.groovy :
grails.servlet.version = "2.5" // Change depending on target container compliance (2.5 or 3.0)
grails.project.work.dir = 'target'
grails.project.class.dir = "target/classes"
grails.project.test.class.dir = "target/test-classes"
grails.project.test.reports.dir = "target/test-reports"
grails.project.target.level = 1.6
grails.project.source.level = 1.6
//grails.project.war.file = "target/${appName}-${appVersion}.war"
grails.project.dependency.resolution = {
// inherit Grails' default dependencies
inherits("global") {
// specify dependency exclusions here; for example, uncomment this to disable ehcache:
// excludes 'ehcache'
}
log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
checksums true // Whether to verify checksums on resolve
repositories {
inherits true // Whether to inherit repository definitions from plugins
grailsPlugins()
grailsHome()
grailsCentral()
mavenLocal()
mavenCentral()
// uncomment these (or add new ones) to enable remote dependency resolution from public Maven repositories
//mavenRepo "http://snapshots.repository.codehaus.org"
//mavenRepo "http://repository.codehaus.org"
//mavenRepo "http://download.java.net/maven/2/"
//mavenRepo "http://repository.jboss.com/maven2/"
mavenRepo 'http://repo.spring.io/milestone'
grailsRepo "http://grails.org/plugins"
}
dependencies {
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes eg.
// runtime 'mysql:mysql-connector-java:5.1.20'
runtime 'mysql:mysql-connector-java:5.1.27'
compile "org.grails.plugins:spring-security-core:2.0.0"
}
plugins {
//runtime ":hibernate:$grailsVersion"
//compile 'utils:utils:1.4-SNAPSHOT'
compile ":hibernate:3.6.10.4"
//runtime ":jquery:1.7.2"
runtime ":jquery:1.10.2"
//runtime ':pvpi:0.1-SNAPSHOT'
//runtime (':pvpi:0.1'){
//changing = true
//}
//runtime ":resources:1.1.6"
runtime ":resources:1.2.1"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.4"
build ":tomcat:7.0.47"
//build ":tomcat:$grailsVersion"
//runtime ":database-migration:1.1"
runtime ":database-migration:1.3.8"
//compile ':cache:1.0.0'
compile ':cache:1.1.1'
compile ":scaffolding:2.0.0"
compile ":spring-security-core:2.0.0"
}
}
The logs sent to the console display all the online locations that the build goes to try and find the the spring-security-core software - here is a list of all these locations:
grailsCentral: http://grails.org/plugins/grails-spring-security-core/tags/RELEASE_3.1.1/spring-security-core-3.1.1.pom
mavenCentral: http://repo1.maven.org/maven2/org/grails/plugins/spring-security-core/3.1.1/spring-security-core-3.1.1.pom
http://mvnrepository.com/artifact/: http://mvnrepository.com/artifact/org/grails/plugins/spring-security-core/3.1.1/spring-security-core-3.1.1.pom
http://repo.spring.io/milestone/: http://repo.spring.io/milestone/org/grails/plugins/spring-security-core/3.1.1/spring-security-core-3.1.1.pom
http://grails.org/plugin: http://grails.org/plugin/grails-spring-security-core/tags/RELEASE_3.1.1/spring-security-core-3.1.1.pom
-mike