问题
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