title: missing or invalid dependency detected while loading class file
body: <p>I have a multi module SBT project with modules named as commons, teradata, mysql, postgres etc.
  commons as expected is a common module which every other module depends on.
  I am getting the below error only for the module teradata when I compile it.
  commons and the remaining modules compile fine without any error.</p>
  
  <pre><code>[error] missing or invalid dependency detected while loading class file 'HDFSUtil.class'.
  [error] Could not access term hadoop in package org.apache,
  [error] because it (or its dependencies) are missing. Check your build definition for
  [error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
  [error] A full rebuild may help if 'HDFSUtil.class' was compiled against an incompatible version of org.apache.
  [error] missing or invalid dependency detected while loading class file 'HDFSUtil.class'.
  [error] Could not access term io in value org.apache.hadoop,
  [error] because it (or its dependencies) are missing. Check your build definition for
  [error] missing or conflicting dependencies. (Re-run with `-Ylog-classpath` to see the problematic classpath.)
  [error] A full rebuild may help if 'HDFSUtil.class' was compiled against an incompatible version of org.apache.hadoop.
  [error] two errors found
  [error] (teradata/compile:compileIncremental) Compilation failed
  [error] Total time: 5 s, completed Jul 29, 2016 7:48:50 PM
  </code></pre>
  
  <p>commons module depends the HDFS library with library dependency scope set as provided as shown below.</p>
  
  <pre><code>"org.apache.hadoop" % "hadoop-client" % "2.7.1" % "provided",
  </code></pre>
  
  <p><strong>if I remove the provided scope the above compile time error disappears.</strong></p>
  
  <p>The teradata module itself doesn't have any dependency apart from unmanaged dependency on teradata jdbc and commons module.
  I have tried removing my .sbt and .iv2 files and doing a clean build again but the error won't go away.
  what could be possibly wrong here?</p>