title: Maven dependency as module
body: <p>I am not very well versed in maven and I am getting confused on how to handle the following use cases in maven.</p>
  
  <p>There is an open source framework which is on maven. I want to be able to extend this framework. While extending, I also want to test that the extension is correct. So, I want one project which also contains the framework and the test application. </p>
  
  <p>I tried something which is not working. I created a maven project <strong>samplejsonextend</strong> with two modules:</p>
  
  <ul>
  <li><p>Module1. JsonPath (which is the original open source framework)   </p></li>
  <li><p>Module2. JSONPathTest (which is the application which uses the<br>
  original framework)</p></li>
  </ul>
  
  <p><strong>samplejsonextend</strong> pom.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;parent&gt;
          &lt;artifactId&gt;samplejsonextend&lt;/artifactId&gt;
          &lt;groupId&gt;com.samplejsonextend&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.samplejsonextend.JSONPathTest&lt;/groupId&gt;
      &lt;artifactId&gt;JSONPathTest&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
              &lt;artifactId&gt;json-path&lt;/artifactId&gt;
              &lt;version&gt;2.2.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>Module1</strong> (JSONPath) pom.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;parent&gt;
          &lt;artifactId&gt;samplejsonextend&lt;/artifactId&gt;
          &lt;groupId&gt;com.samplejsonextend&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
  
      &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
      &lt;artifactId&gt;json-path&lt;/artifactId&gt;
      &lt;version&gt;2.2.0&lt;/version&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><strong>Module2</strong> (JSONPathTest) pom.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;parent&gt;
          &lt;artifactId&gt;samplejsonextend&lt;/artifactId&gt;
          &lt;groupId&gt;com.samplejsonextend&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.samplejsonextend.JSONPathTest&lt;/groupId&gt;
      &lt;artifactId&gt;JSONPathTest&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.jayway.jsonpath&lt;/groupId&gt;
              &lt;artifactId&gt;json-path&lt;/artifactId&gt;
              &lt;version&gt;2.2.0&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The issue with the above configuration is that no code is downloaded for module1. Is that the proper way of achieving this? If yes, then can I get some hints for why it is not working?  If it's not the proper way, then how can this be achieved?</p>