I'm trying to read out the artifact versions that are in a Maven repository in order to update my version numbers (yes, this is the best way to do this given the restrictions we have). I can see in the metadata.xml file for the repository that it's got the version information in it, but I'd like to avoid having to request that file directly. I've so far been unable to find any documentation about Maven to do this.
A Maven repo is just a directory structure. Every version in its own subdirectory below the group and artificact directories.
On JitPack, you get a plain text list of versions, for example https://jitpack.io/com/github/twogood/kronslott-sendgrid/
For oss.sonatype.org it's a directory listing, for example: https://oss.sonatype.org/content/repositories/releases/io/dropwizard/dropwizard-core/
Add the Versions Maven Plugin to your pom.xml
file.
To display the dependencies with newer versions available, run the command:
mvn versions:display-dependency-updates
To rewrite your pom.xml
file to use the latest release versions of the project's dependencies, run the command:
mvn versions:use-latest-releases
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.