how do I tell maven 3.6.3 to get latest version of artifact from custom repository

妖精的绣舞 提交于 2021-01-29 19:45:05

问题


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

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

来源:https://stackoverflow.com/questions/60208951/how-do-i-tell-maven-3-6-3-to-get-latest-version-of-artifact-from-custom-reposito

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!