title: IntelliJ can't find sqljdbc4.jar from Maven even though it resolves?
body: <p>IntelliJ does not let me import <strong>com.microsoft</strong> even though Maven resolves the dependency and it appears as a Module in my project settings (thus should be in the classpath).     </p>
  
  <p><a href="https://i.stack.imgur.com/wNHe0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wNHe0.png" alt="enter image description here"></a></p>
  
  <p>External dependency resolves: 
  Modules: 
  <a href="https://i.stack.imgur.com/Q4o29.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Q4o29.png" alt="enter image description here"></a></p>
  
  <p>POM file has this:</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.arcologydesigns.rest&lt;/groupId&gt;
      &lt;artifactId&gt;ads-webapp&lt;/artifactId&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;springexample Maven Webapp&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
  
      &lt;properties&gt;
          &lt;endorsed.dir&gt;${project.build.directory}/endorsed&lt;/endorsed.dir&gt;
          &lt;spring.version&gt;4.0.5.RELEASE&lt;/spring.version&gt;
          &lt;jdk.version&gt;1.8&lt;/jdk.version&gt;
          &lt;jackson.version&gt;2.2.3&lt;/jackson.version&gt;
          &lt;!--&lt;sqlserver.version&gt;4.2.6420.100&lt;/sqlserver.version&gt;--&gt;
          &lt;sqlserver.version&gt;4&lt;/sqlserver.version&gt;
          &lt;build.scm.revision&gt;SCM_IDENTIFIER&lt;/build.scm.revision&gt;
          &lt;build.number&gt;BUILD_NUMBER&lt;/build.number&gt;
          &lt;build.id&gt;BUILD_ID&lt;/build.id&gt;
          &lt;build.job.name&gt;BUILD_JOB_NAME&lt;/build.job.name&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;version&gt;3.8.1&lt;/version&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-core&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
              &lt;version&gt;${spring.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
              &lt;artifactId&gt;sqljdbc4&lt;/artifactId&gt;
              &lt;version&gt;${sqlserver.version}&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.json&lt;/groupId&gt;
              &lt;artifactId&gt;json&lt;/artifactId&gt;
              &lt;version&gt;20120521&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;ads-webapp&lt;/finalName&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I used the following to install sqljdbc driver (which I downloaded from MSDN) for Maven: <a href="http://techmajik.com/2014/04/24/how-to-setup-maven-dependency-for-microsoft-sql-server/" rel="nofollow noreferrer">http://techmajik.com/2014/04/24/how-to-setup-maven-dependency-for-microsoft-sql-server/</a></p>