First, export to the default directory Targed/dependency
1. Export the project-dependent jar package from the MAVEN project: Enter the directory where the project Pom.xml is located and execute the following command:
MVN dependency:copy-dependencies
2, in Eclipse, select the project's Pom.xml file, click Run as in the context menu, see the Red box, in the Popup configuration window, enter Dependency:copy-dependencies, click
Second, export to a custom directory
Under the MAVEN project, create the Lib folder and enter the following command:
MVN Dependency:copy-dependencies-doutputdirectory=lib
The jar packages that the MAVEN project relies on are copied to the Lib directory under the project directory.
Iii. setting the level of dependency
You can also set the dependency level, typically using the compile level:
MVN Dependency:copy-dependencies-doutputdirectory=lib-dincludescope=compile
Eclipse exports maven-dependent jar packages