First, export to the default directory Targed/dependency
To export a project-dependent jar package from a MAVEN project: Enter the directory where the project Pom.xml is located and execute the following command:
1. MVN dependency:copy-dependencies
Or in Eclipse, select the project's Pom.xml file, click Run as in the context menu, see red Box, in the Popup configuration window, enter Dependency:copy-dependencies, click
The jar packages that the MAVEN project relies on are exported to the Targed/dependency directory.
Second, export to a custom directory
Under the MAVEN project, create the Lib folder and enter the following command:
1. MVN Dependency:copy-dependencies-doutputdirectory=lib
third, the set dependency level Maven project depends on the jar package will be copied to the project directory under the Lib directory
You can also set the dependency level, typically using the compile level
1. MVN Dependency:copy-dependencies-doutputdirectory=lib-dincludescope=compile
Eclipse MAVEN export project-dependent JAR packages