title: Maven , How to add dependency of local system java-source?
body: <p>I want to build one jar that includes a child module which depends on other package of my own project.</p>
  
  <p>The output one jar should include all the related class (both from jar and my own project's classes).So the child module's classes is the base classes that should be included in the output jar,and these import some classes of my own project.All the related classes in my own project should be included.</p>
  
  <p>for more detail please visit <a href="https://stackoverflow.com/questions/34063105/how-to-automatically-collect-all-related-class-into-one-jar-use-maven">How to automatically collect all related class into one jar (use maven)?</a></p>
  
  <p>Here is what I already find:</p>
  
  <pre><code>  &lt;project&gt;
     &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;scope&gt;system&lt;/scope&gt;
          &lt;systemPath&gt;D:\how\to\write&lt;/systemPath&gt;
          &lt;groupId&gt;how.to.write&lt;/groupId&gt;
          &lt;artifactId&gt;how-to-write&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;type&gt;java-source&lt;/type&gt;
       &lt;/dependency&gt;
     &lt;/dependencies&gt;
   &lt;/project&gt;
  </code></pre>
  
  <p>The error message is :  <code>Could not find artifact how.to.write:how-to-write:jar:sources:0.0.1-SNAPSHOT at specified path D:\how\to\write</code> </p>
  
  <p>the path <code>D:\how\to\write</code> contains my own project's classes that could support the build</p>