You will most-likely need both plugins. If you need to extract some of the dependencies or copy them to a certain location, you will need the maven-dependency-plugin
's copy
and unpack
(or even unpack-dependencies
) goals. For the actual packaging, you will need to write an assembly descriptor and use the maven-assembly-plugin
.
The maven-assembly-plugin
can copy all your dependencies (or some of them) to a specified directory. While this is useful, more often than not, you will need to do something more custom and require a different location (possibly even per dependency).
Both plugins are very useful and are quite often used together as they can complement/facilitate each other's work.