title: Maven dependency to jar in Nexus
body: <p>How can I add a dependency to a jar, which is in my private maven repository?</p>
  
  <p>I have a private nexus repository, say: <a href="https://localhost/repository/my-team/" rel="nofollow noreferrer">https://localhost/repository/my-team/</a></p>
  
  <p>In one project, I generate, compile and pack to a jar some java classes. say, <code>my.jar</code>.
  Then I upload it to nexus as a jar:</p>
  
  <pre class="lang-sh prettyprint-override"><code>curl --upload-file my.jar \ 
       "https://localhost/repository/my-team/com/example/artifact/my.jar"
  </code></pre>
  
  <p>In another project I want to refer to this jar as a dependency:</p>
  
  <pre><code>&lt;repositories&gt;
       &lt;repository&gt;
          &lt;id&gt;nexus&lt;/id&gt;
          &lt;url&gt;https://localhost/repository/my-team/&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  </code></pre>
  
  <p><strong>How can I add a dependency</strong> in this case? Where do I specify the url to that jar file?</p>