title: IntelliJ cannot load sources from local Maven repository
body: <p>I'm doing some testing work that requires the use of features in JUnit which are unfamiliar to me.  In order to better understand these features I'd like to be able to view the JUnit sources inside IntelliJ alongside my project.</p>
  
  <p>This project uses Maven.  I have the following dependency for jUnit listed in my pom.xml file:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;dependency&gt;
      &lt;groupId&gt;junit&lt;/groupId&gt;
      &lt;artifactId&gt;junit&lt;/artifactId&gt;
      &lt;version&gt;4.10&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>When I run "mvn clean install" on the command line the jUnit sources are downloaded from my company's Maven repository into my local Maven repository (.m2 directory).  The project then compiles and runs without issue.</p>
  
  <p>After right-clicking on the pom.xml file and selecting Maven->Reimport I can see that the classes, sources, and javadocs for jUnit are also present in the library settings in IntelliJ:</p>
  
  <p><img src="https://i.stack.imgur.com/bSm69.png" alt="Sources visible in IntelliJ library settings"></p>
  
  <p>However, when I try to open a jUnit class file in IntelliJ and click on the "Download Sources" link I see this:</p>
  
  <p><img src="https://i.stack.imgur.com/NzS1z.png" alt="Sources missing in IntelliJ when viewing class"></p>
  
  <p>It seems to might like IntelliJ should be finding these sources just fine locally.  Even if it did have to download them from my company's repository I also believe it should find them there since that's where the junit-4.10-sources.jar file in my local repository originally came from.</p>
  
  <p>What might be keeping IntelliJ from loading the sources from the JAR file that it already knows about?</p>