Manually add a jar package to the MAVEN repository

Source: Internet
Author: User

Introduction:

Although MAVEN is configured to automatically download the jar package to the local Maven repository by indexing, this allows the project to use the rack package in the local warehouse directly,

But this trick is not every time Turin should, also have encountered a failure, when encountered failure, we can use the form of command to import the rack package

The local Maven repository, which can then be used directly in the project. Eg: when I use Druid, I can't get directly from Ali's warehouse to Druid-1.0.27-sources.jar,

Druid-1.0.27-javadoc.jar, can only be obtained from the International warehouse later in the import to the local warehouse.

1. Maven command moves the jar package to Maven's local repository

Grammar:

MVN Install:install-file-dfile=jar Package Position (parameter i)-dgroupid=groupid (parameter II)-dartifactid=artifactid (Parameter III)-dversion=version ( Parameter four)-dpackaging=jar

"Program Files" in the middle of the space , so to add double quotation marks, the other three parameters, copied from the above can be.

eg

Install Oracle-connector-java:

MVN Install:install-file-dgroupid=oracle-dartifactid=oracle-connector-java-dversion=11.2.0.1.0-dpackaging=jar- Dfile=f:\ojdbc6-11.2.0.1.0.jar

Installation: Druid-1.0.27-sources.jar

MVN install:install-file-dgroupid=druid-dartifactid=druid-1.0.27-sources-dversion=1.0.27-dpackaging=jar-dfile=e : \druid-1.0.27-sources.jar

If you do not want to use the command, you can directly copy the downloaded jar package to the MAVEN repository, the pro-test is effective, do not know whether there will be sequelae.

Reference URL:

Https://www.cnblogs.com/tangshengwei/p/6341628.html

Manually add a jar package to the MAVEN 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.