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 below in the red box, in the Popup configuration window, after entering 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 |
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
1 |
MVN Dependency:copy-dependencies-doutputdirectory=lib-dincludescope=compile
|
Original path: http://my.oschina.net/cloudcoder/blog/212648?