Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.9k views
in Technique[技术] by (71.8m points)

scala - Unresolved Dependencies when building play 2.0 project

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:

[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

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

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

so there is a problem with .ivy2 repository

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

the same is for slf4j-api-1.6.1.jar


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...