Methods for MAVEN to import external jar packages

Source: Internet
Author: User

Maven's approach to importing external jar packages (If there is an external jar package)

1. Question:

When Maven adds a dependency package, the addition is unsuccessful and can optionally be imported into the repository via an external command.

2. Command: (on DOS command line)

MVN install:install-file-dfile= local jar Package Storage directory-dgroupid=jar package add dependent GroupID name-dartifactid=jar package Add dependent Artifactid name- Dversion=jar Package Add dependent Version-dpackaging=jar

3. For example:

Add dependencies in the Pom file such as:

<dependency>     <groupId>com.ibm.db2</groupId>     <artifactid>db2jcc</artifactid >     <version>8.1</version> </dependency>

Execute the following command on the DOS command line:

MVN INSTALL:INSTALL-FILE-DFILE=E:\WORKBENCH-BUILD123\DB2JCC.JAR-DGROUPID=COM.IBM.DB2-DARTIFACTID=DB2JCC- Dversion=8.1-dpackaging=jar

Methods for MAVEN to import external jar packages

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.