Maven Dependency Downloader
Download Maven dependencies easily using the command line. This tool simplifies the process of retrieving individual artifacts without needing to manage a full project.
Using the Maven Dependency Plugin
The maven-dependency-plugin
provides a convenient way to download artifacts. Below is an example of how to download a specific dependency:
# To manually download artifacts:
mvn org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=org.apache.geronimo.specs:geronimo-servlet_3.0_spec:1.2 -Dpackaging=jar -Dtransitive=false
Explanation
Parameters
-Dartifact
: Specifies the artifact coordinates (groupId:artifactId:version).-Dpackaging
: Specifies the packaging type (e.g., jar, pom).-Dtransitive=false
: Prevents transitive dependencies from being downloaded.
Remember to replace org.apache.geronimo.specs:geronimo-servlet_3.0_spec:1.2
with the desired artifact coordinates.
Further Reading
For more information on the Maven Dependency Plugin, refer to the following resources: