0

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)

I followed the how do i tell maven to get latest version of artifact from custom nexus repository.

How do I tell Maven to use the latest version of a dependency?

https://www.baeldung.com/maven-dependency-latest-version

        <dependencies>
        <dependency>
            <groupId>com.LDBS</groupId>
            <artifactId>LDBS</artifactId>
          <version>1.0.0-SNAPSHOT</version>                 
        </dependency>

    </dependencies>

    <repositories>
   <repository>
       <id>org.demo.repo</id>
       <url>http://demoRepo/dependencies</url>
    </repository>

<build>
<plugins>
    <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>versions-maven-plugin</artifactId>
        <version>2.7</version>
    </plugin>
</plugins>

After including the version plugin (mvn versions:display-dependency-updates) I am able to see the latest new version enter image description here

But I can't download that version to my local repo using following commands

  • mvn versions:use-releases
  • mvn versions:use-next-releases

    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

Debugger
  • 306
  • 3
  • 19

0 Answers0