Install MAVEN, Eclipse settings, add address jar

Source: Internet
Author: User

1. Download maven

Address: http://maven.apache.org/download.cgi

2. Install Maven

System variable: maven_home = D:\maven\apache-maven-3.3.9

System variable: PATH =%maven_home%\bin

I believe that we all have to match the environment variables, the detailed steps will not say, to the attribute name and attribute values to match the OK.

Open cmd, knock inside: mvn-version

3.Eclipse settings

4. Importing a local jar

For example:
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20090211</version>
</dependency>
Add this file to the Pom.xml file and the tool will automatically download the jar package.


If you add a method for a jar package that does not exist in the online MAVEN resource.
Need to use to command:
MVN install:install-file-dfile=%_jar%-dgroupid=%_gid%-dartifactid=%_aid%-dversion=%_ver%-Dpackaging=%_pkg%

%_jar%: Enter the file location of the jar (the address of the local file)
%_gid%: Input groupid (usually the name of the jar package)
%_aid%: Input Artifactid (similar to above, finer in scope)
%_ver%: Enter version (release number)
%_pkg%: Input Packaging Method (default is Jar)
Example:

MVN install:install-file-dfile=d:\jar\vspherelib.jar-dgroupid=com.cpc-dartifactid=vsphere-dversion=1.0- Dpackaging=jar
Then the package succeeds.
The jar package is then imported into Maven dependencies, but the jar is still local.

Install MAVEN, Eclipse settings, add address jar

Related Article

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.