title: how do I tell maven 3.6.3 to get latest version of artifact from custom repository
body: <p>I need to download the latest version of artifact from custom repository rather than maven repository.(Download a latest single artifact from the custom repository)</p>
  
  <p>I followed the <a href="https://stackoverflow.com/questions/23514208/how-do-i-tell-maven-to-get-latest-version-of-artifact-from-custom-nexus-reposito">how do i tell maven to get latest version of artifact from custom nexus repository</a>.</p>
  
  <p><a href="https://stackoverflow.com/questions/30571/how-do-i-tell-maven-to-use-the-latest-version-of-a-dependency?rq=1">How do I tell Maven to use the latest version of a dependency?</a></p>
  
  <p><a href="https://www.baeldung.com/maven-dependency-latest-version" rel="nofollow noreferrer">https://www.baeldung.com/maven-dependency-latest-version</a></p>
  
  <pre><code>        &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.LDBS&lt;/groupId&gt;
              &lt;artifactId&gt;LDBS&lt;/artifactId&gt;
            &lt;version&gt;1.0.0-SNAPSHOT&lt;/version&gt;                 
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
      &lt;repositories&gt;
     &lt;repository&gt;
         &lt;id&gt;org.demo.repo&lt;/id&gt;
         &lt;url&gt;http://demoRepo/dependencies&lt;/url&gt;
      &lt;/repository&gt;
  </code></pre>
  
  <p> </p>
  
  <pre><code>&lt;build&gt;
  &lt;plugins&gt;
      &lt;plugin&gt;
          &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
          &lt;artifactId&gt;versions-maven-plugin&lt;/artifactId&gt;
          &lt;version&gt;2.7&lt;/version&gt;
      &lt;/plugin&gt;
  &lt;/plugins&gt;
  </code></pre>
  
  <p></p>
  
  <p>After including the version plugin (mvn versions:display-dependency-updates) I am able to see the latest new version
  <a href="https://i.stack.imgur.com/wzF7s.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wzF7s.png" alt="enter image description here"></a></p>
  
  <p>But I can't download that version to my local repo using following commands</p>
  
  <ul>
  <li>mvn versions:use-releases</li>
  <li><p>mvn versions:use-next-releases</p>
  
  <p>Still I am only getting the old snapshot version not the latest version jars from my custom repo. Eclipse mavendependencies too referring the old snapshots because latest version are not downloaded in local repo
  Any one please advise</p></li>
  </ul>