Eclipse exports maven-dependent jar packages

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.