0
votes

I'm having trouble to find out why grails cannot resolve some dependencies. This is the error message I get when trying to compile/clean/run-app:

==== localMavenResolver: tried 
        ....

==== http://grails.org/plugins: tried
        http://grails.org/plugins/grails-org.springframework.security.web/tags/RELEASE_3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.web;3.0.4.RELEASE!org.springframework.security.web.jar:
        http://grails.org/plugins/grails-org.springframework.security.web/tags/RELEASE_3.0.4.RELEASE/grails-org.springframework.security.web-3.0.4.RELEASE.jar

        ==== grailsCentral: tried
        http://grails.org/plugins/grails-org.springframework.security.web/tags/RELEASE_3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.web;3.0.4.RELEASE!org.springframework.security.web.jar:
        http://grails.org/plugins/grails-org.springframework.security.web/tags/RELEASE_3.0.4.RELEASE/grails-org.springframework.security.web-3.0.4.RELEASE.jar

        ==== http://repo.grails.org/grails/core: tried
        http://repo.grails.org/grails/core/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.web;3.0.4.RELEASE!org.springframework.security.web.jar:
        http://repo.grails.org/grails/core/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.jar

        ==== http://snapshots.repository.codehaus.org: tried
        http://snapshots.repository.codehaus.org/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.web;3.0.4.RELEASE!org.springframework.security.web.jar:
        http://snapshots.repository.codehaus.org/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.jar

        ==== http://repository.codehaus.org: tried
        http://repository.codehaus.org/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.web;3.0.4.RELEASE!org.springframework.security.web.jar:
        http://repository.codehaus.org/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.jar

        ==== http://repository.jboss.com/maven2/: tried
        http://repository.jboss.com/maven2/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.web;3.0.4.RELEASE!org.springframework.security.web.jar:
        http://repository.jboss.com/maven2/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.jar

        ==== http://download.java.net/maven/2/: tried
        http://download.java.net/maven/2/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.web;3.0.4.RELEASE!org.springframework.security.web.jar:
        http://download.java.net/maven/2/org/springframework/security/org.springframework.security.web/3.0.4.RELEASE/org.springframework.security.web-3.0.4.RELEASE.jar

        ==== localMavenResolver: tried 
        ....


        ==== http://grails.org/plugins: tried
        http://grails.org/plugins/grails-org.springframework.security.core/tags/RELEASE_3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
        -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
              http://grails.org/plugins/grails-org.springframework.security.core/tags/RELEASE_3.0.4.RELEASE/grails-org.springframework.security.core-3.0.4.RELEASE.jar
            ==== grailsCentral: tried
              http://grails.org/plugins/grails-org.springframework.security.core/tags/RELEASE_3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
              -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
              http://grails.org/plugins/grails-org.springframework.security.core/tags/RELEASE_3.0.4.RELEASE/grails-org.springframework.security.core-3.0.4.RELEASE.jar
            ==== http://repo.grails.org/grails/core: tried
              http://repo.grails.org/grails/core/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
              -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
              http://repo.grails.org/grails/core/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.jar
            ==== http://snapshots.repository.codehaus.org: tried
              http://snapshots.repository.codehaus.org/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
              -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
              http://snapshots.repository.codehaus.org/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.jar
            ==== http://repository.codehaus.org: tried
              http://repository.codehaus.org/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
              -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
              http://repository.codehaus.org/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.jar
            ==== http://repository.jboss.com/maven2/: tried
              http://repository.jboss.com/maven2/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
              -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
              http://repository.jboss.com/maven2/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.jar
            ==== http://download.java.net/maven/2/: tried
              http://download.java.net/maven/2/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
              -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
        http://download.java.net/maven/2/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.jar

        ==== mavenCentral: tried
              http://repo1.maven.org/maven2/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.pom
              -- artifact org.springframework.security#org.springframework.security.core;3.0.4.RELEASE!org.springframework.security.core.jar:
              http://repo1.maven.org/maven2/org/springframework/security/org.springframework.security.core/3.0.4.RELEASE/org.springframework.security.core-3.0.4.RELEASE.jar


                ::::::::::::::::::::::::::::::::::::::::::::::
                ::          UNRESOLVED DEPENDENCIES         ::
                ::::::::::::::::::::::::::::::::::::::::::::::
                :: org.springframework.security#org.springframework.security.web;3.0.4.RELEASE: not found
                :: org.springframework.security#org.springframework.security.core;3.0.4.RELEASE: not found
                ::::::::::::::::::::::::::::::::::::::::::::::



        | Error Failed to resolve dependencies (Set log level to 'warn' in BuildConfig.groovy for more information):

        - org.springframework.security:org.springframework.security.web:3.0.4.RELEASE
        - org.springframework.security:org.springframework.security.core:3.0.4.RELEASE

This is what I included in my Buildconfig.groovy:

        grails.project.dependency.resolution = {
    // inherit Grails' default dependencies
    inherits("global") {
        // uncomment to disable ehcache
        // excludes 'ehcache'
    }
    log "warn" // log level of Ivy resolver, either 'error', 'warn', 'info', 'debug' or 'verbose'
    repositories {
        grailsRepo "http://grails.org/plugins"
        grailsPlugins()
        grailsHome()
        grailsCentral()

        mavenRepo "http://snapshots.repository.codehaus.org"
        mavenRepo "http://repository.codehaus.org"
        mavenRepo "http://repository.jboss.com/maven2/"
}
    }
    plugins {
        compile ":tomcat:2.1.3"
        compile ":spring-security-core:1.2.7.3"

I guess the spring "security-core depends" on "org.springframework.security.web 3.0.4.RELEASE" and "org.springframework.security.core 3.0.4.RELEASE". Do I have to add another plugin or dependecy?

2
what's strange, that correct name would be org.springframework.security:spring-security-web:3.0.4.RELEASE, not org.springframework.security:org.springframework.security.web:3.0.4.RELEASE. But where it coming from? - Igor Artamonov

2 Answers

0
votes

Try adding mavenCentral() to your list of repositories.

0
votes

Turned out I had an old version of a project that my project depended on...