maven-Installing the jar package to the local warehouse

Source: Internet
Author: User

Because the project requires a SQL Server database, but cannot find its corresponding pom dependency, you need to install the local jar package to the local repository and define the pom dependency. For example, other jar packages can refer to this method

CMD command statement:

MVN install:install-file-dfile=sqljdbc4.jar -dpackaging=jar-dgroupid=com.microsoft.sqlserver - dartifactid=sqljdbc4 -dversion=4.0

Success Example:

Pom dependency:

1 <Dependency>2       <groupId>Com.microsoft.sqlserver</groupId>3       <Artifactid>SQLJDBC4</Artifactid>4       <version>4.0</version>5     </Dependency>

Detailed configuration:

  Brown Font : The location of the local jar package, which can enter its location at the cmd command line, or a full-position path, such as D:\sqljdbc4.jar, is required.

Red font:   Custom GroupID

Blue font :   Custom Artifactid

Green font :   Custom Version Number

maven-Installing the jar package to the local warehouse

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.