How do I download JAR during a build in Maven script?
Normally you don't use Maven for "just downloading", but for your build process. So normally, you do the following steps:
mvn compile
As a side effect, you will have downloaded the library to your local Maven repository. There are a lot of plugins to do something with dependencies, so have e.g. a look at the Maven Dependency plugin.