1
libraryDependencies += "commons-codec" % "commons-codec" % "1.9-SNAPSHOT"
val bytes = DigestUtils.sha256(message)

Throws compiler error:

value sha256 is not a member of object 
org.apache.commons.codec.digest.DigestUtils

But when I go to look at the docs, it's clearly a static method returning a byte array.

When I use:

libraryDependencies += "commons-codec" % "commons-codec" % "1.6"

The same code works. What am I doing wrong?

rbellamy
  • 5,683
  • 6
  • 38
  • 48
  • Are you sure you have the correct artifact coordinates? There's no 1.9-SNAPSHOT listed [here](http://search.maven.org/#browse%7C-1511838660), nor [here](http://mvnrepository.com/artifact/commons-codec/commons-codec) – S.R.I Nov 18 '13 at 05:28
  • [Looks like](http://svn.apache.org/viewvc/commons/proper/codec/trunk/pom.xml?revision=1539776&view=markup) the coordinates are correct. Just for fun, have you verified the repo you're fetching the snapshot from is correct and that the jar looks as it should? I've found weird things happen with snapshot versions. Maybe you should download the source, build yourself, and install in your local `m2` just to see what happens. – Vidya Nov 18 '13 at 05:33
  • I'm using the Sonatype public repository [here](https://repository.sonatype.org/index.html#nexus-search;gav~commons-codec~commons-codec~~~~kw,versionexpand) – rbellamy Nov 18 '13 at 14:25
  • And rolling back to 1.8 fixed it for me. – rbellamy Nov 18 '13 at 21:50

0 Answers0