Download artifact from Maven repository in Java program
问题 I need to write Java code that downloads a given artifact (GAV) from a given Maven repository. In the past I used the REST interface of Nexus 2 (which is quite easy) but I would like to have something which is independent of the repository (Nexus 2, Nexus 3, Artifactory) used. In Fetching Maven artifacts programmatically a similar question is asked, but the main answer is from 2014 and suggests a library that was not updated since 2014. 回答1: One can do the following thing with Aether (Version