For jar packs that are not in the official warehouse, MAVEN imports jar packages with the following command from the local warehouse

Source: Internet
Author: User


http://yeelor.iteye.com/blog/1646928

For jar packs that are not in the official warehouse, MAVEN imports jar packages with the following command from the local warehouse

CMD code MVN install:install-file-dgroupid= Package name-dartifactid= Project name-dversion= version number-dpackaging=jar-dfile=jar file path

Take Paoding-analysis.jar as an example:

1, put the Paoding-analysis.jar file in the "D:\lib" directory

2, in a Pom.xml file in the engineering directory to execute the order:

CMD code MVN install:install-file-dfile=d:\lib\paoding-analysis.jar-dgroupid=net.paoding-dartifactid= Paoding-analysis-dversion=3-dpackaging=jar-dgeneratepom=true-dcreatechecksum=true

This allows Maven to import the Paoding-analysis.jar package to the local repository successfully.

D:\Documents and Settings\administrator\.m2\repository\net\paoding\paoding-analysis\3\paoding-analysis-3.jar

3.pom.xml File configuration:

  XML code     <dependency>       <groupid>net.paoding</ groupid>       <artifactId>paoding-analysis</artifactId>        <version>3</version>       <type> jar</type>   </dependency>                                                                                                                                              

4. Example:

  CMD code     MVN install:install-file-dfile=f:\java\maven-workspace\mylucenetest\lib\ Paoding-analysis-3.jar-dgroupid=net.paoding-dartifactid=paoding-analysis-dversion=3-dpackaging=jar- Dgeneratepom=true-dcreatechecksum=true     MVN install:install-file-dfile=f:\java\maven-workspace\ mylucenetest\lib\cpdetector-1.0.10.jar-dgroupid=info.monitorenter-dartifactid=cpdetector-dversion=1.0.10- Dpackaging=jar-dgeneratepom=true-dcreatechecksum=true      mvn install:install-file-dfile=f:\java\ maven-workspace\mylucenetest\lib\chardet-1.1.jar-dgroupid=org.mozilla.intl-dartifactid=chardet-dversion=1.1- dpackaging=jar-dgeneratepom=true-dcreatechecksum=true      5. Example add Ojdbc.jar driver   MAVEN code    mvn install:install-file -dfile=i:\lib\ojdbc6.jar -dgroupid=com.oracle - dartifactid=ojdbc6 -dversion=11.1.0.6.0 -dpackaging=jar -dgeneratepom=true - dcreatechecksum=true      

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.