我无法找出为什么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"
我猜春天“security-core取决于”org.springframework.security.web 3.0.4.RELEASE“和”org.springframework.security.core 3.0.4.RELEASE“。我是否必须添加另一个插件或依赖?
答案 0 :(得分:0)
尝试将mavenCentral()
添加到您的存储库列表中。
答案 1 :(得分:0)
原来我有一个项目的旧版本,我的项目依赖于......