title: Unable to access parent project library(jar) in child module - Maven
body: <p>I have a Project called <em>Parent</em>. Its type is POM. There is a library (<code>ojdbc6.jar</code>) that is not available in public repository so I am accessing it via <code>&lt;SystemPath&gt;</code> as you can see in below <code>pom.xml</code>:</p>
  
  <pre><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.Parent&lt;/groupId&gt;
      &lt;artifactId&gt;Parent&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;modules&gt;
          &lt;module&gt;childModule&lt;/module&gt;
      &lt;/modules&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.oracle&lt;/groupId&gt;
              &lt;artifactId&gt;ojdbc&lt;/artifactId&gt;
              &lt;version&gt;6&lt;/version&gt;
              &lt;scope&gt;system&lt;/scope&gt;
              &lt;systemPath&gt;${basedir}/lib/ojdbc6.jar&lt;/systemPath&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;in-project&lt;/id&gt;
              &lt;name&gt;In Project Repo&lt;/name&gt;
              &lt;url&gt;file://${basedir}/lib&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  </code></pre>
  
  <p></p>
  
  <p>Now the child project names are <em>Child-Module1</em> and <em>Child-Module2</em> use this (<code>ojdbc6.jar</code>) library It's POM is mentioned below:</p>
  
  <pre><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;testApp&lt;/artifactId&gt;
      &lt;version&gt;1.14.5.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
      &lt;name&gt;APP1&lt;/name&gt;
      &lt;description&gt;Application&lt;/description&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;com.Parent&lt;/groupId&gt;
          &lt;artifactId&gt;Parent&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>When I build using Maven it gives me error:</p>
  
  <pre><code>Description Resource    Path    Location    Type
  The container 'Maven Dependencies' references non existing library
  'C:\Users\ABCCOMPUTER_NAME\.m2\repository\com\oracle\ojdbc\6\ojdbc-6.jar'
  testApp Build path Problem.
  </code></pre>
  
  <p>Why does it looks in local repository? It happen only when parent project contains a library (<code>jar</code>) that contains system path. It does not happen when access system path library (<code>jar</code>) in same project, like parent referring <code>ojdbc6.jar</code>, it is fine there. </p>