0

我很难找出为什么 grails 无法解决某些依赖项。这是我在尝试编译/清理/运行应用程序时收到的错误消息:

==== 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

这是我在 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"

我猜春天的“安全核心取决于”“org.springframework.security.web 3.0.4.RELEASE”和“org.springframework.security.core 3.0.4.RELEASE”。我是否必须添加另一个插件或依赖项?

4

2 回答 2

0

尝试添加mavenCentral()到您的存储库列表中。

于 2013-04-18T13:47:39.660 回答
0

原来我有一个旧版本的项目,我的项目依赖于......

于 2013-04-18T14:57:59.217 回答