title: maven compile does not recognize my local repo dependency
body: <p>I have a local jar file to import into my folder, and I have run the mvn install:</p>
  
  <pre><code>mvn install:install-file -Dfile="C:\myapp\Development\core\target\api-core-1.0.0.jar" -DgroupId="com.myapp" -DartifactId="api-core" -Dversion="1.0.0" -Dpackaging=jar
  </code></pre>
  
  <p>And this is successuful:</p>
  
  <pre><code>------------------------------------------------------------------------
  [INFO] Building api-malloc 0.0.1
  [INFO] ------------------------------------------------------------------------
  [INFO]
  [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ api-malloc ---
  [INFO] Installing C:\myapp\Development\core\target\api-core-1.0.0.jar to C:\Users\myname\.m2\repository\com\myapp\api-core\1.0.0\api-core-1.0.0.jar
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD SUCCESS
  </code></pre>
  
  <p>From the .me folder, I can also see that the appropriate files are generated:</p>
  
  <p><a href="https://i.stack.imgur.com/NHq0v.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NHq0v.png" alt="enter image description here"></a></p>
  
  <p>In the pom.xml file, I have:</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/xsd/maven-4.0.0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com.myapp&lt;/groupId&gt;
      &lt;artifactId&gt;api-malloc&lt;/artifactId&gt;
      &lt;version&gt;0.0.1&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.myapp&lt;/groupId&gt;
              &lt;artifactId&gt;api-core&lt;/artifactId&gt;
              &lt;version&gt;1.0.0&lt;/version&gt;
          &lt;/dependency&gt;
          ... rest of dependencies
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;sourceDirectory&gt;src&lt;/sourceDirectory&gt;
          &lt;resources&gt;
              &lt;resource&gt;
                  &lt;directory&gt;src&lt;/directory&gt;
                  &lt;excludes&gt;
                      &lt;exclude&gt;**/*.java&lt;/exclude&gt;
                  &lt;/excludes&gt;
              &lt;/resource&gt;
          &lt;/resources&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.4&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                          &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                           &lt;/manifest&gt;
                           &lt;addMavenDescriptor&gt;false&lt;/addMavenDescriptor&gt;
                      &lt;/archive&gt;
                      &lt;webResources&gt;
                           &lt;webResource&gt; 
                             &lt;directory&gt;${project.build.directory}/WebContent/WEB-INF&lt;/directory&gt; 
                             &lt;includes&gt; 
                               &lt;include&gt;web.xml&lt;/include&gt; 
                             &lt;/includes&gt; 
                             &lt;targetPath&gt;WEB-INF&lt;/targetPath&gt; 
                             &lt;filtering&gt;true&lt;/filtering&gt; 
                           &lt;/webResource&gt;
                      &lt;/webResources&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.10&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                      &lt;id&gt;copy-dependencies&lt;/id&gt;
                      &lt;phase&gt;process-resources&lt;/phase&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                      &lt;/goals&gt;
                      &lt;configuration&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/WebContent/WEB-INF/lib&lt;/outputDirectory&gt;
                              &lt;includeScope&gt;runtime&lt;/includeScope&gt;
                              &lt;overWriteReleases&gt;false&lt;/overWriteReleases&gt;
                              &lt;overWriteSnapshots&gt;false&lt;/overWriteSnapshots&gt;
                              &lt;overWriteIfNewer&gt;true&lt;/overWriteIfNewer&gt;
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I also did a maven update project after installing the jar file.</p>
  
  <p>However Eclipse still complain about the classes from that dependency api-core-1.0.0.jar cannot be resolved to a type.</p>
  
  <p>What did I miss?</p>
  
  <hr>
  
  <h2>EDIT</h2>
  
  <p>The maven's settings.xml file is already included the lines while the error persist.</p>
  
  <pre><code>&lt;settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" 
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
            xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"&gt;
    &lt;localRepository&gt;C:/Users/username/.m2/repository&lt;/localRepository&gt;
    &lt;offline&gt;false&lt;/offline&gt;
  </code></pre>
  
  <p>And in Eclipse, the maven setting is correct:</p>
  
  <p><a href="https://i.stack.imgur.com/tlOth.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tlOth.png" alt="enter image description here"></a></p>