MAVEN command installs JAR package to local repository

Source: Internet
Author: User
Tags aliyun

78767480

The Maven install command can be used when the required jar package is not found in the central repository or in the MAVEN repository where you want to put the jar package that you generated.

Here are the steps (provided that MAVEN is installed and environment variables are configured).
Example
① will need to install the jar pack into the D drive

② Open the command line and enter the following command
MVN Install:install-file-dfile=jar The position of the package-dgroupid= above the groupid-dartifactid= above the artifactid-dversion= above the version- Dpackaging=jar
Example

③ at this point, you can open the Maven repository and find the jar package you just installed, based on GroupID

Open the diagram Pom file

如下在项目POM文件中引用即可<dependency>      <groupId>com.aliyun</groupId> <artifactId>aliyun-java-sdk-core</artifactId> <version>3.2.3</version></dependency>

MAVEN command installs JAR package to 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.