Command line artifact download goal

This goal is meant to help the user download an artifact from the repositories directly from the command line without having to pass by the dependency plugin. The dependency plugin is hard to use when wanting to download only one artifact seperatly. Also, this goal can be used without the need to have a pom file in the working directory. When there is no pom files, will simply load information for repository from the settings.xml file.

mvn com.googlecode:maven-download-plugin:artifact \
                        -DgroupId=com.googlecode \
                        -DartifactId=maven-download-plugin \
                        -Dversion=0.1 \
                        -DoutputDirectory=temp

This command would have downloaded the maven download plugin, create the directory temp if it does not exist and then copy the artifact to this location. The plugin can also search transitively to get all the dependent artifact by using the dependencyDepth option.

mvn com.googlecode:maven-download-plugin:artifact \
                        -DgroupId=com.googlecode \
                        -DartifactId=maven-download-plugin \
                        -Dversion=0.1 \
                        -DoutputDirectory=temp \
                        -DdependencyDepth=2

Take a look at the artifact goal documentation for all the plugin options.

Using from POM file

This is not suggested since the dependency plugin already exist and do a good job at it. See dependency plugin for more informations.