1

i am looking for days for a solution of my problem. I have to download a specific jar from the mvnrepository to a specific folder directly, and more important programatically. So i need to make a call to the repository to download the jar and then save it for further working.

I have the plugin/goal dependency:get in my mind, but how can i make a command like: mvn dependency:get ... work? I heard about the invoker plugin, but cant figure out how to use it. (Again, i cant add the artifact/dependency in the pom.xml, because it has to be done while the programm is running)

Any ideas anyone? Everything would be much appreciated because i cant progress anyfurther now :(

Mechamod
  • 21
  • 8
  • Can you explain for what purpose you like to do that? And in which environment? In Jenkins ? – khmarbaise Nov 01 '18 at 12:48
  • in Eclipse, for a programm make it possible to choose some from a list of jars, that needs to be downloaded in a specified location, for different tasks like inspecting the changes, getting copied etc. – Mechamod Nov 01 '18 at 12:50
  • Inspecting changes sounds more like a job for a version control tool (git, svn etc.) furthermore for downloading artifacts programmatically I would recommend https://maven.apache.org/resolver/ ... – khmarbaise Nov 01 '18 at 12:56
  • 1
    Possible duplicate of [Downloading all maven dependencies to a directory NOT in repository?](https://stackoverflow.com/questions/7908090/downloading-all-maven-dependencies-to-a-directory-not-in-repository) – jordiburgos Nov 01 '18 at 21:27

0 Answers0