构建play 2.0项目时存在未解决的依赖关系 [英] Unresolved Dependencies when building play 2.0 project
问题描述
昨天,我按照安全指示从安全类型中下载了play-2.0,但是当我使用sbt进行构建时,出现未解决的依赖项错误:
Downloaded play-2.0 from type safe yesterday, following instructions as far as I can, but when I come to build with sbt I get unresolved dependency errors:
[警告] :: org.slf4j#slf4j-api; 1.6.1:在以下位置找不到配置 org.slf4j#slf4j-api; 1.6.1:编译".这是必需的 org.hibernate#hibernate-validator; 4.2.0.Final编译[警告] :: commons-codec#commons-codec; 1.4:在以下位置找不到配置 commons-codec#commons-codec; 1.4:编译".这是必需的 org.apache.httpcomponents#httpclient; 4.1.2编译[警告] :::::::::::::::::::::::::::::::::::::::::::::: [错误] {file:/Users/george/work/play/gbraw/} gbraw/*:更新: sbt.ResolveException:未解决的依赖项: org.slf4j#slf4j-api; 1.6.1:在以下位置找不到配置 org.slf4j#slf4j-api; 1.6.1:编译".这是必需的 org.hibernate#hibernate-validator; 4.2.0.最终编译[错误] 未解决的依赖项:commons-codec#commons-codec; 1.4:配置 在commons-codec#commons-codec; 1.4中找不到:编译".它是 需要org.apache.httpcomponents#httpclient; 4.1.2编译
[warn] :: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile [warn] :: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile [warn] :::::::::::::::::::::::::::::::::::::::::::::: [error] {file:/Users/george/work/play/gbraw/}gbraw/*:update: sbt.ResolveException: unresolved dependency: org.slf4j#slf4j-api;1.6.1: configuration not found in org.slf4j#slf4j-api;1.6.1: 'compile'. It was required from org.hibernate#hibernate-validator;4.2.0.Final compile [error] unresolved dependency: commons-codec#commons-codec;1.4: configuration not found in commons-codec#commons-codec;1.4: 'compile'. It was required from org.apache.httpcomponents#httpclient;4.1.2 compile
我已经删除了.sbt目录(从较早版本的sbt中删除),但是没有任何乐趣.我确定我周围不应该有什么东西,但我希望您能从何处找到指导...
I have deleted my .sbt directory (from an earlier install of sbt) but no joy. I'm sure I have something lying around that I shouldn't have but I'd appreciate any guidance on where to look...
谢谢
推荐答案
.ivy2存储库存在问题
so there is a problem with .ivy2 repository
关于 commons-codec-1.4
有 ivy-1.4.xml 和 ivydata-1.4.properties 文件
在 $ {ivy_home}/cache/commons-codec/commons-codec 目录中
但是/jars 子目录中的否真正的 commons-codec-1.4.jar
删除这些 .xml 和 .properties 文件,并再次使用sbt编译您的项目
依赖项应立即获取
as for commons-codec-1.4
there are ivy-1.4.xml and ivydata-1.4.properties files
in ${ivy_home}/cache/commons-codec/commons-codec dir
but NO real commons-codec-1.4.jar in /jars subdir
DELETE these .xml and .properties files and compile your project with sbt once again
dependency should fetch now
对于 slf4j-api-1.6.1.jar
这篇关于构建play 2.0项目时存在未解决的依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!