I have a fairly simple Maven project:
...
Despite answer from CaioToOn above, I still had problems getting this to work initially.
After multiple attempts, finally got it working. Am pasting my final version here - hoping it will benefit somebody else.
org.apache.maven.plugins
maven-dependency-plugin
2.8
copy
package
copy-dependencies
${project.build.directory}/libMD
org.eclipse.m2e
lifecycle-mapping
1.0.0
org.apache.maven.plugins
maven-dependency-plugin
[2.0,)
copy-dependencies