Spring Security Kerberos扩展Gradle Build问题

时间:2014-03-12 00:20:40

标签: spring security build gradle kerberos

我尝试按照示例gradle配置将spring security kerberos扩展(http://projects.spring.io/spring-security-kerberos/)添加到我的项目中:

dependencies {
     compile 'org.springframework.security:spring-security-kerberos-core:1.0.0.CI-SNAPSHOT'
}
repositories {
    maven {
         url 'http://repo.spring.io/snapshot'
  }

}

我一直收到以下错误:

Could not resolve all dependencies for configuration ':compile'.
> Could not find org.springframework.security:spring-security-kerberos-core:1.0.0.CI-SNAPSHOT

我很困惑,我做错了什么,还是完全关闭了kerberos扩展文档?

1 个答案:

答案 0 :(得分:2)

可能是一个简单的错字。试试这个(注意' org.springframework.security。 kerberos '经过this link验证):

<强>摇篮

apply plugin: 'java'

dependencies {
     compile 'org.springframework.security.kerberos:spring-security-kerberos-core:1.0.0.CI-SNAPSHOT'
}

repositories {
    maven { url 'http://repo.spring.io/snapshot' }
}

task go () << {
   println "go"
}

<强>的Maven

  ...
      <dependency>
         <groupId>org.springframework.security.kerberos</groupId>
         <artifactId>spring-security-kerberos-core</artifactId>
         <version>1.0.0.CI-SNAPSHOT</version>
      </dependency>
  </dependencies>
  <repositories>
    <repository>
      <id>spring-snapshots</id>
      <name>Spring Snapshots</name>
      <url>http://repo.spring.io/snapshot</url>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
...

这个答案背后的方法是将浏览器指向顶级repo URL并手动浏览网站。对于许多不同的回购,这是一个成功的故障排除策略。