18

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

om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
George Ball
  • 181
  • 1
  • 3
  • 5
    Have you tried to delete the `~/.ivy2/` folder? That's where the libraries are cached. – drexin Mar 14 '12 at 14:19
  • Perfect thank you... I removed the .m2 directory but had forgotten about .ivy2. Works a treat now! – George Ball Mar 14 '12 at 15:00
  • though I've done this about three times now, removing the ivy cache directory - is there maybe an underlying problem here? – PlexQ Mar 25 '12 at 06:18
  • I have the same problem, I just downloaded play-2.0, created a project (play new todo) and inside the project folder called "play dependencies". There is still a problem with org.slf4j:slf4j-api:1.6.1 which is "Evicted by 1.6.4" and I absolutely don't know how to solve this dependency... – Mironor Apr 03 '12 at 06:58
  • 5
    Deleting .ivy2 did the trick for me, but why does this happen? Is there a less brute-force way to do this? – Bill Jun 15 '12 at 23:32

1 Answers1

17

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

siarzh
  • 171
  • 2