I'm developing a plugin for another software, which - in theory - I can update by replacing the jar file and executing the reload endpoint in the software the plugin is for.
As my plugin is published to a maven repository, I wondered if I could use the maven resolver to get those dependencies. I tried to build the download URI manually, by looking at the meta-data and downloading the artifact based on the latest
tag, but I realized that this doesn't work for snapshots, for which I would have to parse yet another xml file to retrieve the latest "version"/"revision" of this snapshot.
So I wondered if it is somehow possible to use mavens internal tools for this, and if possible also use the local repository to install SNAPSHOT versions that are not yet published to the repository.
Also I would need to authenticate to my maven repository with a username and a password, which I could either read from a config file (preferred, as not all machines I use the plugin on have maven installed yet) or could be placed in the settings.xml.
Is it possible to use the code that maven uses to resolve dependencies programmatically in java, and if so which additional dependencies would I need?