Reputation: 331
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.
Upvotes: 0
Views: 3096
Reputation: 13885
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
Upvotes: 1
Reputation: 6116
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/
Upvotes: 1