In Eclipse, you can create a project jar with its required dependencies in an adjacent sub-folder by doing ...
Export->Java->Runnable JAR file
Select Library handling option: Copy required libraries into a sub-folder next to the generated JAR
Is there a way to do this with the Maven assembly plugin? Or is there another Maven plugin that would be more appropriate for this task?
Thanks!
It's not exactly what you want but if you use the
war:war
goal (with-DfailOnMissingWebXml=false
) it will put the dependencies in theWEB-INF/lib
directory in yourtarget
folder.Alternatively check out the dependency plugin.
yes you can use assembly plugin. pom.xml:
assembly.xml