Put the jar package into the local repository with the MAVEN command

Source: Internet
Author: User

Sometimes we need to tell ourselves that some of the jar packages are put into Maven's local repository, and if it is not effective to put the jar package directly, because MAVEN cannot recognize it, after all, there are fewer auxiliary files, so you need to use MAVEN's commands to complete the JAR package additions.

For example, the D-drive Commons-dbcp-1.3.jar file is placed under the warehouse path:

MVN install:install-file-dfile=d:\commons-dbcp-1.3.jar-dgroupid=org.apache.commons-dartifactid=dbcp-dversion= 1.3-dpackaging=jar-dgeneratepom=true-dcreatechecksum=true


Where:-dfile is the path where the jar package is located,-dgroupid is the group name,-dartifactid is the id,-dversion is the version number, about the group name, ID, and version number, if you have a knowledge of Maven should know, In fact, the path to the local jar is segmented in the local repository, the local warehouse path > Group name >ID> version number >jar package, which is the complete path structure of the warehouse jar package.

Also use the Local MAVEN tool command in the Settring.xml to configure the path of the local repository:


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.